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

Unified Diff: cc/layers/solid_color_layer_impl_unittest.cc

Issue 2615773003: Replace LayerImpl::sorting_context_id with transform reference. (Closed)
Patch Set: Sync to head. Created 3 years, 11 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
Index: cc/layers/solid_color_layer_impl_unittest.cc
diff --git a/cc/layers/solid_color_layer_impl_unittest.cc b/cc/layers/solid_color_layer_impl_unittest.cc
index d2e2bb86dac9c30a47fa5bccd4fec018da37f473..d35b779d979fd14cb6ecbcbe7df3c25b57796e9b 100644
--- a/cc/layers/solid_color_layer_impl_unittest.cc
+++ b/cc/layers/solid_color_layer_impl_unittest.cc
@@ -149,10 +149,10 @@ TEST(SolidColorLayerImplTest, VerifyOpaqueRect) {
layer->SetBackgroundColor(SkColorSetARGBInline(255, 10, 20, 30));
EXPECT_TRUE(layer->contents_opaque());
{
- std::unique_ptr<SolidColorLayerImpl> layer_impl =
- SolidColorLayerImpl::Create(host->host_impl()->active_tree(),
- layer->id());
- layer->PushPropertiesTo(layer_impl.get());
+ DebugScopedSetImplThread scoped_impl_thread(host->GetTaskRunnerProvider());
+ host->FinishCommitOnImplThread(host->host_impl());
+ LayerImpl* layer_impl =
+ host->host_impl()->active_tree()->LayerById(layer->id());
// The impl layer should call itself opaque as well.
EXPECT_TRUE(layer_impl->contents_opaque());
@@ -175,12 +175,12 @@ TEST(SolidColorLayerImplTest, VerifyOpaqueRect) {
layer->SetBackgroundColor(SkColorSetARGBInline(254, 10, 20, 30));
EXPECT_FALSE(layer->contents_opaque());
{
- std::unique_ptr<SolidColorLayerImpl> layer_impl =
- SolidColorLayerImpl::Create(host->host_impl()->active_tree(),
- layer->id());
- layer->PushPropertiesTo(layer_impl.get());
+ DebugScopedSetImplThread scoped_impl_thread(host->GetTaskRunnerProvider());
+ host->FinishCommitOnImplThread(host->host_impl());
+ LayerImpl* layer_impl =
+ host->host_impl()->active_tree()->LayerById(layer->id());
- // The impl layer should callnot itself opaque anymore.
+ // The impl layer should not call itself opaque anymore.
EXPECT_FALSE(layer_impl->contents_opaque());
// Impl layer has 1 opacity, but the color is not opaque, so the opaque_rect

Powered by Google App Engine
This is Rietveld 408576698