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

Unified Diff: cc/trees/layer_tree_host_unittest_delegated.cc

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/layer_tree_host_unittest_damage.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_delegated.cc
diff --git a/cc/trees/layer_tree_host_unittest_delegated.cc b/cc/trees/layer_tree_host_unittest_delegated.cc
index cc81707ee765d7c169105193245a520e203e5407..380113a804a4293320cd2c520aaa45aff2826470 100644
--- a/cc/trees/layer_tree_host_unittest_delegated.cc
+++ b/cc/trees/layer_tree_host_unittest_delegated.cc
@@ -252,7 +252,13 @@ class LayerTreeHostDelegatedTestLayerUsesFrameDamage
if (!first_draw_for_source_frame_)
return result;
- gfx::RectF damage_rect = frame->render_passes.back()->damage_rect;
+ gfx::RectF damage_rect;
+ if (!frame->has_no_damage) {
+ damage_rect = frame->render_passes.back()->damage_rect;
+ } else {
+ // If there is no damage, then we have no render passes to send.
+ EXPECT_TRUE(frame->render_passes.empty());
+ }
switch (host_impl->active_tree()->source_frame_number()) {
case 0:
« no previous file with comments | « cc/trees/layer_tree_host_unittest_damage.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698