Commit 4d63a471 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

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: default avatardanakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638290}
parent 5dd9513f
......@@ -435,6 +435,12 @@ class CC_EXPORT LayerImpl {
// 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 @@ class CC_EXPORT LayerImpl {
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 @@ class CC_EXPORT LayerImpl {
DrawMode current_draw_mode_;
private:
FRIEND_TEST_ALL_PREFIXES(SurfaceLayerImplTest, GetEnclosingRectInTargetSpace);
PropertyTrees* GetPropertyTrees() const;
ClipTree& GetClipTree() const;
EffectTree& GetEffectTree() const;
......
......@@ -261,9 +261,6 @@ TEST(SurfaceLayerImplTest, SurfaceLayerImplWithMatchingPrimaryAndFallback) {
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 @@ TEST(SurfaceLayerImplTest, GetEnclosingRectInTargetSpace) {
surface_layer_impl->GetEnclosingRectInTargetSpace());
}
} // namespace
} // namespace cc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment