diff options
author | zhurunz@google.com <zhurunz@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 17:59:25 +0000 |
---|---|---|
committer | zhurunz@google.com <zhurunz@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 17:59:25 +0000 |
commit | 7d1d235e5730527a50caf787550055118c164fa0 (patch) | |
tree | f6ed5f10ff26c150d82ba791054fa14c71c72236 /o3d/plugin/mac | |
parent | 7ac575734caffdb73ec426bb3296a38a11249ce0 (diff) | |
download | chromium_src-7d1d235e5730527a50caf787550055118c164fa0.zip chromium_src-7d1d235e5730527a50caf787550055118c164fa0.tar.gz chromium_src-7d1d235e5730527a50caf787550055118c164fa0.tar.bz2 |
Some changes in RENDERMODE_CONTINUOUS mode when max_fps has been set.
If Renderer::max_fps has been set, rendering is driven by incoming new
textures. We draw on each new texture as long as not exceeding max_fps.
If we are in RENDERMODE_ON_DEMAND mode, Client::Render() can still set dirty
specifically.
If we are in ENDERMODE_CONTINUOUS mode, we do NOT set dirty on each tick any
more (since it is already driven by new textures.).
There is one problem here: what if new texture don't come in for some reason?
If that happened, no rendering callback will be invoked and this can cause
problem sometimes. For example, some UI may depend on the rendering callback
to work correctly.
So, in RENDERMODE_CONTINUOUS mode, if we have set max_fps but haven't
received any new texture for a while, we draw anyway to trigger the rendering
callback.
Review URL: http://codereview.chromium.org/2899008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin/mac')
-rw-r--r-- | o3d/plugin/mac/plugin_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/o3d/plugin/mac/plugin_mac.mm b/o3d/plugin/mac/plugin_mac.mm index 26c8f7c..66b8ba6 100644 --- a/o3d/plugin/mac/plugin_mac.mm +++ b/o3d/plugin/mac/plugin_mac.mm @@ -280,7 +280,7 @@ void RenderTimer::TimerCallback(CFRunLoopTimerRef timer, void* info) { obj->IsOffscreenRenderingEnabled(); if (plugin_visible && obj->renderer()) { - if (obj->client()->render_mode() == o3d::Client::RENDERMODE_CONTINUOUS || + if (obj->client()->NeedsContinuousRender() || obj->renderer()->need_to_render()) { // Force a sync to the VBL (once per timer callback) // to avoid tearing |