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

Unified Diff: cc/layers/render_surface_unittest.cc

Issue 1902893002: cc: Move calculation of content rect to RenderSurfaceImpl class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@targetid
Patch Set: fix error Created 4 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/layers/render_surface_impl.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/render_surface_unittest.cc
diff --git a/cc/layers/render_surface_unittest.cc b/cc/layers/render_surface_unittest.cc
index df85cb058c6247dd42f0b66852b473370e97a3d9..2c211779ee05cfe39995a5e66c6dfaf8803a6323 100644
--- a/cc/layers/render_surface_unittest.cc
+++ b/cc/layers/render_surface_unittest.cc
@@ -54,7 +54,8 @@ TEST(RenderSurfaceTest, VerifySurfaceChangesAreTrackedProperly) {
// Currently, the content_rect, clip_rect, and
// owning_layer->layerPropertyChanged() are the only sources of change.
EXECUTE_AND_VERIFY_SURFACE_CHANGED(render_surface->SetClipRect(test_rect));
- EXECUTE_AND_VERIFY_SURFACE_CHANGED(render_surface->SetContentRect(test_rect));
+ EXECUTE_AND_VERIFY_SURFACE_CHANGED(
+ render_surface->SetContentRectForTesting(test_rect));
owning_layer->SetOpacity(0.5f);
EXPECT_TRUE(render_surface->SurfacePropertyChanged());
@@ -66,7 +67,7 @@ TEST(RenderSurfaceTest, VerifySurfaceChangesAreTrackedProperly) {
EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(
render_surface->SetClipRect(test_rect));
EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(
- render_surface->SetContentRect(test_rect));
+ render_surface->SetContentRectForTesting(test_rect));
std::unique_ptr<LayerImpl> dummy_mask =
LayerImpl::Create(host_impl.active_tree(), 2);
@@ -110,7 +111,7 @@ TEST(RenderSurfaceTest, SanityCheckSurfaceCreatesCorrectSharedQuadState) {
gfx::Transform origin;
origin.Translate(30, 40);
- render_surface->SetContentRect(content_rect);
+ render_surface->SetContentRectForTesting(content_rect);
render_surface->SetClipRect(clip_rect);
render_surface->SetDrawOpacity(1.f);
@@ -173,7 +174,7 @@ TEST(RenderSurfaceTest, SanityCheckSurfaceCreatesCorrectRenderPass) {
origin.Translate(30.0, 40.0);
render_surface->SetScreenSpaceTransform(origin);
- render_surface->SetContentRect(content_rect);
+ render_surface->SetContentRectForTesting(content_rect);
TestRenderPassSink pass_sink;
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698