summaryrefslogtreecommitdiffstats
path: root/o3d/core/cross/renderer.h
diff options
context:
space:
mode:
authorzhurunz@google.com <zhurunz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-09 17:59:25 +0000
committerzhurunz@google.com <zhurunz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-09 17:59:25 +0000
commit7d1d235e5730527a50caf787550055118c164fa0 (patch)
treef6ed5f10ff26c150d82ba791054fa14c71c72236 /o3d/core/cross/renderer.h
parent7ac575734caffdb73ec426bb3296a38a11249ce0 (diff)
downloadchromium_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/core/cross/renderer.h')
-rw-r--r--o3d/core/cross/renderer.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/o3d/core/cross/renderer.h b/o3d/core/cross/renderer.h
index 76f18e2..3be95f4 100644
--- a/o3d/core/cross/renderer.h
+++ b/o3d/core/cross/renderer.h
@@ -210,9 +210,8 @@ class Renderer {
need_to_render_ = need_to_render;
}
- // We only respect max_fps in RENDERMODE_ON_DEMAND.
- // When max_fps is set to positive value in RENDERMODE_ON_DEMAND,
- // we render on every new texture without exceeding max_fps.
+ // When max_fps is set to positive value, we render on every new texture as
+ // long as not exceeding max_fps.
// Get max_fps
int max_fps() const {