cc: avoid friending test
And instead make function public.
I did not move the definition, because, as far as I can tell, the
declarations/definitions are rather out of sync for this file.
BUG=none
TEST=none
Change-Id: Ie0b21ffdf14513e1e67c4d1d0dce70703745387f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1505838
Commit-Queue: Scott Violet <sky@chromium.org>
Auto-Submit: Scott Violet <sky@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638290}
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index d2e95ca..158381e 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -435,6 +435,12 @@
// PopulateScaledSharedQuadState().
virtual gfx::Rect GetEnclosingRectInTargetSpace() const;
+ // Returns the bounds of this layer in target space when scaled by |scale|.
+ // This function scales in the same way as
+ // PopulateScaledSharedQuadStateQuadState(). See
+ // PopulateScaledSharedQuadStateQuadState() for more details.
+ gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const;
+
void UpdatePropertyTreeForAnimationIfNeeded(ElementId element_id);
float GetIdealContentsScale() const;
@@ -484,12 +490,6 @@
SkColor color,
float width) const;
- // Returns the bounds of this layer in target space when scaled by |scale|.
- // This function scales in the same way as
- // PopulateScaledSharedQuadStateQuadState(). See
- // PopulateScaledSharedQuadStateQuadState() for more details.
- gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const;
-
private:
void ValidateQuadResourcesInternal(viz::DrawQuad* quad) const;
@@ -563,8 +563,6 @@
DrawMode current_draw_mode_;
private:
- FRIEND_TEST_ALL_PREFIXES(SurfaceLayerImplTest, GetEnclosingRectInTargetSpace);
-
PropertyTrees* GetPropertyTrees() const;
ClipTree& GetClipTree() const;
EffectTree& GetEffectTree() const;
diff --git a/cc/layers/surface_layer_impl_unittest.cc b/cc/layers/surface_layer_impl_unittest.cc
index 531445a..9442d3f 100644
--- a/cc/layers/surface_layer_impl_unittest.cc
+++ b/cc/layers/surface_layer_impl_unittest.cc
@@ -261,9 +261,6 @@
EXPECT_EQ(SK_ColorBLUE, surface_draw_quad1->default_background_color);
}
-} // namespace
-
-// This test is outside the anonymous namespace so that it can be a friend.
TEST(SurfaceLayerImplTest, GetEnclosingRectInTargetSpace) {
gfx::Size layer_size(902, 1000);
gfx::Size viewport_size(902, 1000);
@@ -289,4 +286,5 @@
surface_layer_impl->GetEnclosingRectInTargetSpace());
}
+} // namespace
} // namespace cc