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

Unified Diff: cc/test/layer_test_common.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/test/layer_test_common.h ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_test_common.cc
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index 801bd007cb90cc143097e5252ed3b36b520bf855..b741dc0d673f87598b02aa9d6806ccd312cb79e0 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -31,6 +31,26 @@ namespace cc {
// Align with expected and actual output.
const char* LayerTestCommon::quad_string = " Quad: ";
+RenderSurfaceImpl* GetRenderSurface(LayerImpl* layer_impl) {
+ EffectTree& effect_tree =
+ layer_impl->layer_tree_impl()->property_trees()->effect_tree;
+
+ EffectNode* effect_node = effect_tree.Node(layer_impl->effect_tree_index());
+ if (effect_node->owning_layer_id == layer_impl->id())
+ return effect_tree.GetRenderSurface(layer_impl->effect_tree_index());
+ return nullptr;
+}
+
+const RenderSurfaceImpl* GetRenderSurface(const LayerImpl* layer_impl) {
+ EffectTree& effect_tree =
+ layer_impl->layer_tree_impl()->property_trees()->effect_tree;
+
+ EffectNode* effect_node = effect_tree.Node(layer_impl->effect_tree_index());
+ if (effect_node->owning_layer_id == layer_impl->id())
+ return effect_tree.GetRenderSurface(layer_impl->effect_tree_index());
+ return nullptr;
+}
+
static bool CanRectFBeSafelyRoundedToRect(const gfx::RectF& r) {
// Ensure that range of float values is not beyond integer range.
if (!r.IsExpressibleAsRect())
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698