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

Unified Diff: cc/test/fake_picture_layer.cc

Issue 2828353003: Determine mask UVs based on texture size (Closed)
Patch Set: nit 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/fake_picture_layer.h ('k') | cc/trees/layer_tree_host_pixeltest_masks.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_picture_layer.cc
diff --git a/cc/test/fake_picture_layer.cc b/cc/test/fake_picture_layer.cc
index c8a8add6056fe4585fae1e4aa5f670ccea516c79..5e71a7981cdb74b3aaca4f323d6b383ef8012617 100644
--- a/cc/test/fake_picture_layer.cc
+++ b/cc/test/fake_picture_layer.cc
@@ -31,18 +31,27 @@ FakePictureLayer::~FakePictureLayer() {}
std::unique_ptr<LayerImpl> FakePictureLayer::CreateLayerImpl(
LayerTreeImpl* tree_impl) {
+ std::unique_ptr<FakePictureLayerImpl> layer_impl;
switch (mask_type()) {
case Layer::LayerMaskType::NOT_MASK:
- return FakePictureLayerImpl::Create(tree_impl, id());
+ layer_impl = FakePictureLayerImpl::Create(tree_impl, id());
+ break;
case Layer::LayerMaskType::MULTI_TEXTURE_MASK:
- return FakePictureLayerImpl::CreateMask(tree_impl, id());
+ layer_impl = FakePictureLayerImpl::CreateMask(tree_impl, id());
+ break;
case Layer::LayerMaskType::SINGLE_TEXTURE_MASK:
- return FakePictureLayerImpl::CreateSingleTextureMask(tree_impl, id());
+ layer_impl =
+ FakePictureLayerImpl::CreateSingleTextureMask(tree_impl, id());
+ break;
default:
NOTREACHED();
break;
}
- return nullptr;
+
+ if (!fixed_tile_size_.IsEmpty())
+ layer_impl->set_fixed_tile_size(fixed_tile_size_);
+
+ return std::move(layer_impl);
}
bool FakePictureLayer::Update() {
« no previous file with comments | « cc/test/fake_picture_layer.h ('k') | cc/trees/layer_tree_host_pixeltest_masks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698