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

Unified Diff: cc/layers/layer_impl_unittest.cc

Issue 465853004: Moving RenderSurface creation outside of CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
Index: cc/layers/layer_impl_unittest.cc
diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc
index c61f2c2ff55d4da42596e91feef54530b60cebb6..dec0e99718468cbb3c17a54d6f802c4710831b25 100644
--- a/cc/layers/layer_impl_unittest.cc
+++ b/cc/layers/layer_impl_unittest.cc
@@ -99,6 +99,7 @@ TEST(LayerImplTest, VerifyLayerChangesAreTrackedProperly) {
std::set<LayerImpl*>* scroll_children = new std::set<LayerImpl*>();
scroll_children->insert(scroll_child);
scroll_children->insert(root);
+ root->SetHasRenderSurface(true);
scoped_ptr<LayerImpl> clip_parent =
LayerImpl::Create(host_impl.active_tree(), 5);
@@ -251,11 +252,13 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) {
host_impl.active_tree()->SetRootLayer(
LayerImpl::Create(host_impl.active_tree(), 1));
LayerImpl* root = host_impl.active_tree()->root_layer();
+ root->SetHasRenderSurface(true);
scoped_ptr<LayerImpl> layer_ptr =
LayerImpl::Create(host_impl.active_tree(), 2);
LayerImpl* layer = layer_ptr.get();
root->AddChild(layer_ptr.Pass());
layer->SetScrollClipLayer(root->id());
+ layer->SetHasRenderSurface(true);
DCHECK(host_impl.CanDraw());
gfx::PointF arbitrary_point_f = gfx::PointF(0.125f, 0.25f);
@@ -274,6 +277,7 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) {
arbitrary_filters.Append(FilterOperation::CreateOpacityFilter(0.5f));
SkXfermode::Mode arbitrary_blend_mode = SkXfermode::kMultiply_Mode;
+
// Related filter functions.
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetFilters(arbitrary_filters));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetFilters(arbitrary_filters));

Powered by Google App Engine
This is Rietveld 408576698