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

Unified Diff: cc/trees/layer_tree_host_unittest_occlusion.cc

Issue 2857343002: Delete LayerImpl::GetRenderSurface. (Closed)
Patch Set: none Created 3 years, 7 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/layer_tree_host_unittest_video.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_occlusion.cc
diff --git a/cc/trees/layer_tree_host_unittest_occlusion.cc b/cc/trees/layer_tree_host_unittest_occlusion.cc
index 484c8bb5745cdd2ec51c704ad51d5d92f2317a23..d979e0b46eacff4cec7483100528f48a4fffbebd 100644
--- a/cc/trees/layer_tree_host_unittest_occlusion.cc
+++ b/cc/trees/layer_tree_host_unittest_occlusion.cc
@@ -7,6 +7,7 @@
#include "cc/layers/layer.h"
#include "cc/layers/picture_layer.h"
#include "cc/test/fake_content_layer_client.h"
+#include "cc/test/layer_test_common.h"
#include "cc/test/layer_tree_test.h"
#include "cc/trees/layer_tree_impl.h"
@@ -106,13 +107,13 @@ class LayerTreeHostOcclusionTestDrawPropertiesOnSurface
void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root = impl->active_tree()->root_layer_for_testing();
LayerImpl* child = impl->active_tree()->LayerById(child_->id());
- RenderSurfaceImpl* surface = child->GetRenderSurface();
+ RenderSurfaceImpl* surface = GetRenderSurface(child);
// Verify the draw properties are valid.
EXPECT_TRUE(root->contributes_to_drawn_render_surface());
EXPECT_TRUE(child->contributes_to_drawn_render_surface());
- EXPECT_TRUE(child->GetRenderSurface());
- EXPECT_EQ(child->GetRenderSurface(), child->render_target());
+ EXPECT_TRUE(GetRenderSurface(child));
+ EXPECT_EQ(GetRenderSurface(child), child->render_target());
EXPECT_OCCLUSION_EQ(
Occlusion(surface->draw_transform(), SimpleEnclosedRegion(),
@@ -173,14 +174,14 @@ class LayerTreeHostOcclusionTestDrawPropertiesOnMask
void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root = impl->active_tree()->root_layer_for_testing();
LayerImpl* child = impl->active_tree()->LayerById(child_->id());
- RenderSurfaceImpl* surface = child->GetRenderSurface();
+ RenderSurfaceImpl* surface = GetRenderSurface(child);
LayerImpl* mask = surface->MaskLayer();
// Verify the draw properties are valid.
EXPECT_TRUE(root->contributes_to_drawn_render_surface());
EXPECT_TRUE(child->contributes_to_drawn_render_surface());
- EXPECT_TRUE(child->GetRenderSurface());
- EXPECT_EQ(child->GetRenderSurface(), child->render_target());
+ EXPECT_TRUE(GetRenderSurface(child));
+ EXPECT_EQ(GetRenderSurface(child), child->render_target());
gfx::Transform transform = surface->draw_transform();
transform.PreconcatTransform(child->DrawTransform());
@@ -245,7 +246,7 @@ class LayerTreeHostOcclusionTestDrawPropertiesOnScaledMask
void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* child = impl->active_tree()->LayerById(child_->id());
- LayerImpl* mask = child->GetRenderSurface()->MaskLayer();
+ LayerImpl* mask = GetRenderSurface(child)->MaskLayer();
gfx::Transform scale;
scale.Scale(2, 2);
« no previous file with comments | « cc/trees/layer_tree_host_unittest_damage.cc ('k') | cc/trees/layer_tree_host_unittest_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698