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

Side by Side Diff: ui/compositor/layer_owner_unittest.cc

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Sync with ToT Created 3 years, 4 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 unified diff | Download patch
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/compositor/paint_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/compositor/layer_owner.h" 5 #include "ui/compositor/layer_owner.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/test/null_task_runner.h" 9 #include "base/test/null_task_runner.h"
10 #include "cc/animation/animation_player.h" 10 #include "cc/animation/animation_player.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 ui::ContextFactory* context_factory = nullptr; 75 ui::ContextFactory* context_factory = nullptr;
76 ui::ContextFactoryPrivate* context_factory_private = nullptr; 76 ui::ContextFactoryPrivate* context_factory_private = nullptr;
77 77
78 ui::InitializeContextFactoryForTests(false, &context_factory, 78 ui::InitializeContextFactoryForTests(false, &context_factory,
79 &context_factory_private); 79 &context_factory_private);
80 80
81 compositor_.reset( 81 compositor_.reset(
82 new ui::Compositor(context_factory_private->AllocateFrameSinkId(), 82 new ui::Compositor(context_factory_private->AllocateFrameSinkId(),
83 context_factory, context_factory_private, task_runner, 83 context_factory, context_factory_private, task_runner,
84 false /* enable_surface_synchronization */)); 84 false /* enable_surface_synchronization */,
85 false /* enable_pixel_canvas */));
85 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); 86 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget);
86 } 87 }
87 88
88 void LayerOwnerTestWithCompositor::TearDown() { 89 void LayerOwnerTestWithCompositor::TearDown() {
89 compositor_.reset(); 90 compositor_.reset();
90 ui::TerminateContextFactoryForTests(); 91 ui::TerminateContextFactoryForTests();
91 } 92 }
92 93
93 } // namespace 94 } // namespace
94 95
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 209
209 layer->SetOpacity(0.5f); 210 layer->SetOpacity(0.5f);
210 211
211 scoped_refptr<cc::AnimationPlayer> player = 212 scoped_refptr<cc::AnimationPlayer> player =
212 layer->GetAnimator()->GetAnimationPlayerForTesting(); 213 layer->GetAnimator()->GetAnimationPlayerForTesting();
213 EXPECT_TRUE(player); 214 EXPECT_TRUE(player);
214 EXPECT_TRUE(player->animation_timeline()); 215 EXPECT_TRUE(player->animation_timeline());
215 } 216 }
216 217
217 } // namespace ui 218 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/compositor/paint_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698