Skip to content

Commit

Permalink
cc_blink: Remove WebImageLayer and WebLayerImplFixedBounds
Browse files Browse the repository at this point in the history
Move the functionality of WebLayerImplFixedBounds directly to
GraphicsLayer. When SetContentsToImage() is called, it stores
the size of the image. Then when UpdateContentRect() occurs,
the image_layer_ (which is the contents layer) is resized
always to match the image, and transformed to fill the
content_rect.

The PaintArtifactCompositor was mutating the contents layer
bounds which would break this path, but it didn't intend
to do so for layers it doesn't control. So we move bounds
setting out of PaintArtifactCompositor for foreign layers,
and set the bounds and DrawsContent(true) at the sites where
the ForeignLayerDisplayItem is created when appropriate (ie
for each case except for GraphicsLayer::ContentsLayer()).

With the removal of WebLayerImplFixedBounds there are no
tests left in cc_blink_unittests, so we remove the test
suite.

R=trchen@chromium.org

Bug: 838693
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I2fee4f382eb450af4646a087a08806798a975dd7
Reviewed-on: https://chromium-review.googlesource.com/1053765
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Tien-Ren Chen <trchen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557946}
  • Loading branch information
danakj authored and Commit Bot committed May 11, 2018
1 parent 70f5eed commit c654ee3
Show file tree
Hide file tree
Showing 41 changed files with 89 additions and 559 deletions.
1 change: 0 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ group("gn_all") {
"//base:build_utf8_validator_tables",
"//base:check_example",
"//cc:cc_perftests",
"//cc/blink:cc_blink_unittests",
"//components:components_perftests",
"//device:device_unittests",
"//gin:gin_shell",
Expand Down
30 changes: 0 additions & 30 deletions cc/blink/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ cc_component("blink") {
"cc_blink_export.h",
"web_compositor_support_impl.cc",
"web_compositor_support_impl.h",
"web_image_layer_impl.cc",
"web_image_layer_impl.h",
"web_layer_impl.cc",
"web_layer_impl.h",
"web_layer_impl_fixed_bounds.cc",
"web_layer_impl_fixed_bounds.h",
]

defines = [ "CC_BLINK_IMPLEMENTATION" ]
Expand All @@ -36,29 +32,3 @@ cc_component("blink") {
"//ui/gfx/geometry",
]
}

cc_test("cc_blink_unittests") {
sources = [
"web_layer_impl_fixed_bounds_unittest.cc",

# Setup.
"test/cc_blink_test_suite.cc",
"test/cc_blink_test_suite.h",
"test/run_all_unittests.cc",
]

deps = [
":blink",
"//base/test:test_support",
"//base/third_party/dynamic_annotations",
"//cc",
"//cc:test_support",
"//cc/paint",
"//skia",
"//testing/gmock",
"//testing/gtest",
"//third_party/blink/public:blink",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
]
}
31 changes: 0 additions & 31 deletions cc/blink/test/cc_blink_test_suite.cc

This file was deleted.

37 changes: 0 additions & 37 deletions cc/blink/test/cc_blink_test_suite.h

This file was deleted.

17 changes: 0 additions & 17 deletions cc/blink/test/run_all_unittests.cc

This file was deleted.

7 changes: 0 additions & 7 deletions cc/blink/web_compositor_support_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@

#include <utility>

#include "cc/blink/web_image_layer_impl.h"
#include "cc/blink/web_layer_impl.h"
#include "cc/layers/layer.h"

using blink::WebImageLayer;
using blink::WebLayer;

namespace cc_blink {
Expand All @@ -24,9 +22,4 @@ std::unique_ptr<WebLayer> WebCompositorSupportImpl::CreateLayerFromCCLayer(
return std::make_unique<WebLayerImpl>(layer);
}

std::unique_ptr<blink::WebImageLayer>
WebCompositorSupportImpl::CreateImageLayer() {
return std::make_unique<WebImageLayerImpl>();
}

} // namespace cc_blink
1 change: 0 additions & 1 deletion cc/blink/web_compositor_support_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class CC_BLINK_EXPORT WebCompositorSupportImpl
~WebCompositorSupportImpl() override;

std::unique_ptr<blink::WebLayer> CreateLayerFromCCLayer(cc::Layer*) override;
std::unique_ptr<blink::WebImageLayer> CreateImageLayer() override;

private:
DISALLOW_COPY_AND_ASSIGN(WebCompositorSupportImpl);
Expand Down
40 changes: 0 additions & 40 deletions cc/blink/web_image_layer_impl.cc

This file was deleted.

39 changes: 0 additions & 39 deletions cc/blink/web_image_layer_impl.h

This file was deleted.

94 changes: 0 additions & 94 deletions cc/blink/web_layer_impl_fixed_bounds.cc

This file was deleted.

50 changes: 0 additions & 50 deletions cc/blink/web_layer_impl_fixed_bounds.h

This file was deleted.

Loading

0 comments on commit c654ee3

Please sign in to comment.