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

Unified Diff: cc/test/fake_mask_layer_impl.cc

Issue 2717533005: cc: RenderSurfaceImpl tile mask layer. (Closed)
Patch Set: Prevent single_texture_mask to multi_texture_mask conversion. Created 3 years, 8 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/fake_mask_layer_impl.h ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_mask_layer_impl.cc
diff --git a/cc/test/fake_mask_layer_impl.cc b/cc/test/fake_mask_layer_impl.cc
index e76bad21864c5fe3c1618d81c27f12e3049d7ecc..31c1139fd64e9f1d140e31e5720be19806e94f1b 100644
--- a/cc/test/fake_mask_layer_impl.cc
+++ b/cc/test/fake_mask_layer_impl.cc
@@ -8,13 +8,23 @@
namespace cc {
-FakeMaskLayerImpl::FakeMaskLayerImpl(LayerTreeImpl* tree_impl, int id)
- : LayerImpl(tree_impl, id) {}
+FakeMaskLayerImpl::FakeMaskLayerImpl(LayerTreeImpl* tree_impl,
+ int id,
+ scoped_refptr<RasterSource> raster_source,
+ Layer::LayerMaskType mask_type)
+ : PictureLayerImpl(tree_impl, id, mask_type) {
+ SetBounds(raster_source->GetSize());
+ Region region;
+ UpdateRasterSource(raster_source, &region, nullptr);
+}
std::unique_ptr<FakeMaskLayerImpl> FakeMaskLayerImpl::Create(
LayerTreeImpl* tree_impl,
- int id) {
- return base::WrapUnique(new FakeMaskLayerImpl(tree_impl, id));
+ int id,
+ scoped_refptr<RasterSource> raster_source,
+ Layer::LayerMaskType mask_type) {
+ return base::WrapUnique(
+ new FakeMaskLayerImpl(tree_impl, id, raster_source, mask_type));
}
void FakeMaskLayerImpl::GetContentsResourceId(ResourceId* resource_id,
« no previous file with comments | « cc/test/fake_mask_layer_impl.h ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698