Skip to content

Commit

Permalink
fixed broken merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mkassner committed Feb 25, 2015
1 parent a67f3de commit f70cca9
Showing 1 changed file with 0 additions and 54 deletions.
54 changes: 0 additions & 54 deletions pupil_src/capture/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,60 +364,6 @@ def get_scale():
glfwTerminate()
logger.debug("Process done")

def world_profiled(g_pool,cap_src,cap_size):
import cProfile,subprocess,os
from world import world
cProfile.runctx("world(g_pool,cap_src,cap_size)",{"g_pool":g_pool,'cap_src':cap_src,'cap_size':cap_size},locals(),"world.pstats")
loc = os.path.abspath(__file__).rsplit('pupil_src', 1)
gprof2dot_loc = os.path.join(loc[0], 'pupil_src', 'shared_modules','gprof2dot.py')
subprocess.call("python "+gprof2dot_loc+" -f pstats world.pstats | dot -Tpng -o world_cpu_time.png", shell=True)
print "created cpu time graph for world process. Please check out the png next to the world.py file"upil_positions.append(p)


# allow each Plugin to do its work.
for p in g_pool.plugins:
p.update(frame,recent_pupil_positions,events)

#check if a plugin need to be destroyed
g_pool.plugins = [p for p in g_pool.plugins if p.alive]

# render camera image
glfwMakeContextCurrent(world_window)

make_coord_system_norm_based()
if g_pool.update_textures.value:
draw_named_texture(g_pool.image_tex,frame.img)
else:
draw_named_texture(g_pool.image_tex)
make_coord_system_pixel_based(frame.img.shape)

# render visual feedback from loaded plugins
for p in g_pool.plugins:
p.gl_display()

atb.draw()
glfwSwapBuffers(world_window)
glfwPollEvents()


# de-init all running plugins
for p in g_pool.plugins:
p.alive = False
#reading p.alive actually runs plug-in cleanup
_ = p.alive

save('window_size',bar.window_size.value)
save('calibration_type',bar.calibration_type.value)
save('record_eye',bar.record_eye.value)
save('audio',bar.audio.value)
session_settings.close()

cap.close()
atb.terminate()
glfwDestroyWindow(world_window)
glfwTerminate()
logger.debug("Process done")

def world_profiled(g_pool,cap_src,cap_size):
import cProfile,subprocess,os
from world import world
Expand Down

0 comments on commit f70cca9

Please sign in to comment.