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

Side by Side Diff: cc/resources/picture_pile_unittest.cc

Issue 684653004: Plumb can_use_lcd_text, contents_opaque directly to ContentLayerClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <map> 5 #include <map>
6 #include <utility> 6 #include <utility>
7 7
8 #include "cc/resources/picture_pile.h" 8 #include "cc/resources/picture_pile.h"
9 #include "cc/test/fake_content_layer_client.h" 9 #include "cc/test/fake_content_layer_client.h"
10 #include "cc/test/fake_rendering_stats_instrumentation.h" 10 #include "cc/test/fake_rendering_stats_instrumentation.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 bool UpdateAndExpandInvalidation(Region* invalidation, 62 bool UpdateAndExpandInvalidation(Region* invalidation,
63 const gfx::Size& layer_size, 63 const gfx::Size& layer_size,
64 const gfx::Rect& visible_layer_rect) { 64 const gfx::Rect& visible_layer_rect) {
65 frame_number_++; 65 frame_number_++;
66 return pile_.UpdateAndExpandInvalidation(&client_, 66 return pile_.UpdateAndExpandInvalidation(&client_,
67 invalidation, 67 invalidation,
68 background_color_, 68 background_color_,
69 contents_opaque_, 69 contents_opaque_,
70 false, 70 false,
71 false,
71 layer_size, 72 layer_size,
72 visible_layer_rect, 73 visible_layer_rect,
73 frame_number_, 74 frame_number_,
74 Picture::RECORD_NORMALLY, 75 Picture::RECORD_NORMALLY,
75 &stats_instrumentation_); 76 &stats_instrumentation_);
76 } 77 }
77 78
78 bool UpdateWholePile() { 79 bool UpdateWholePile() {
79 Region invalidation = tiling_rect(); 80 Region invalidation = tiling_rect();
80 bool result = UpdateAndExpandInvalidation( 81 bool result = UpdateAndExpandInvalidation(
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 gfx::Rect smallRect = visible_rect; 1452 gfx::Rect smallRect = visible_rect;
1452 smallRect.Inset(10, 10, 10, 10); 1453 smallRect.Inset(10, 10, 10, 10);
1453 client_.add_draw_rect(smallRect, paint); 1454 client_.add_draw_rect(smallRect, paint);
1454 Region invalidation(visible_rect); 1455 Region invalidation(visible_rect);
1455 UpdateAndExpandInvalidation(&invalidation, tiling_size, visible_rect); 1456 UpdateAndExpandInvalidation(&invalidation, tiling_size, visible_rect);
1456 EXPECT_FALSE(pile_.is_solid_color()); 1457 EXPECT_FALSE(pile_.is_solid_color());
1457 } 1458 }
1458 1459
1459 } // namespace 1460 } // namespace
1460 } // namespace cc 1461 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698