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

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: Add perf test Created 7 years, 9 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
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 e69291d1d3c5c9106244e7a19db2679cd5aa4e42..bb8a47bb3bb582b1e8ca0625cbb481dbc4f0c2f3 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -125,6 +125,7 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
const LayerList* render_surface_layer_list;
LayerList will_draw_layers;
bool contains_incomplete_tile;
+ bool has_no_damage;
enne (OOO) 2013/03/26 01:42:07 Weren't you just saying FrameData had too many mem
danakj 2013/03/26 02:00:10 Yes, this is bad and I feel bad. I tried to do th
// RenderPassSink implementation.
virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE;
@@ -142,7 +143,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);
@@ -198,7 +200,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 Readback(void* pixels, gfx::Rect rect_in_device_viewport);
@@ -447,13 +449,14 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
int64 num_main_thread_scrolls_;
int64 cumulative_num_layers_drawn_;
-
int64 cumulative_num_missing_tiles_;
size_t last_sent_memory_visible_bytes_;
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_;

Powered by Google App Engine
This is Rietveld 408576698