Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3469)

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 12662021: cc: Don't draw and swap if the frame will not change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 016b1651f9e4da37d1d1dce115db0fe56de93137..0730c73b9a15efa1ad12fea7d1bb45a49b072084 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -131,6 +131,7 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
const LayerImplList* render_surface_layer_list;
LayerImplList will_draw_layers;
bool contains_incomplete_tile;
+ bool has_no_damage;
// RenderPassSink implementation.
virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE;
@@ -150,7 +151,8 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
// to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers
// must also be called, regardless of whether DrawLayers is called between the
// two.
- virtual bool PrepareToDraw(FrameData* frame);
+ virtual bool PrepareToDraw(FrameData* frame,
+ gfx::Rect device_viewport_damage_rect);
virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time);
// Must be called if and only if PrepareToDraw was called.
void DidDrawAllLayers(const FrameData& frame);
@@ -208,7 +210,7 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
Renderer* renderer() { return renderer_.get(); }
const RendererCapabilities& GetRendererCapabilities() const;
- virtual bool SwapBuffers();
+ virtual bool SwapBuffers(const FrameData& frame);
void EnableVSyncNotification(bool enable);
void Readback(void* pixels, gfx::Rect rect_in_device_viewport);
@@ -462,6 +464,8 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
size_t last_sent_memory_visible_and_nearby_bytes_;
size_t last_sent_memory_use_bytes_;
+ bool next_frame_damages_full_device_viewport_;
+
base::TimeTicks current_frame_time_;
scoped_ptr<AnimationRegistrar> animation_registrar_;
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698