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

Unified Diff: cc/test/fake_picture_layer.cc

Issue 2688673003: cc: Distinguish single texture mask from normal masks (Closed)
Patch Set: Rebase Created 3 years, 10 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/layers/picture_layer_impl.cc ('k') | cc/test/fake_picture_layer_impl.h » ('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 187350f4b680dfbba7bad69679dbe0f530e27b3a..c8a8add6056fe4585fae1e4aa5f670ccea516c79 100644
--- a/cc/test/fake_picture_layer.cc
+++ b/cc/test/fake_picture_layer.cc
@@ -31,9 +31,18 @@ FakePictureLayer::~FakePictureLayer() {}
std::unique_ptr<LayerImpl> FakePictureLayer::CreateLayerImpl(
LayerTreeImpl* tree_impl) {
- if (is_mask())
- return FakePictureLayerImpl::CreateMask(tree_impl, id());
- return FakePictureLayerImpl::Create(tree_impl, id());
+ switch (mask_type()) {
+ case Layer::LayerMaskType::NOT_MASK:
+ return FakePictureLayerImpl::Create(tree_impl, id());
+ case Layer::LayerMaskType::MULTI_TEXTURE_MASK:
+ return FakePictureLayerImpl::CreateMask(tree_impl, id());
+ case Layer::LayerMaskType::SINGLE_TEXTURE_MASK:
+ return FakePictureLayerImpl::CreateSingleTextureMask(tree_impl, id());
+ default:
+ NOTREACHED();
+ break;
+ }
+ return nullptr;
}
bool FakePictureLayer::Update() {
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/test/fake_picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698