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

Side by Side Diff: ui/compositor/compositor_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/compositor_switches.cc ('k') | ui/compositor/layer.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/test/test_mock_time_task_runner.h" 10 #include "base/test/test_mock_time_task_runner.h"
(...skipping 22 matching lines...) Expand all
33 33
34 void SetUp() override { 34 void SetUp() override {
35 ui::ContextFactory* context_factory = nullptr; 35 ui::ContextFactory* context_factory = nullptr;
36 ui::ContextFactoryPrivate* context_factory_private = nullptr; 36 ui::ContextFactoryPrivate* context_factory_private = nullptr;
37 ui::InitializeContextFactoryForTests(false, &context_factory, 37 ui::InitializeContextFactoryForTests(false, &context_factory,
38 &context_factory_private); 38 &context_factory_private);
39 39
40 compositor_.reset(new ui::Compositor( 40 compositor_.reset(new ui::Compositor(
41 context_factory_private->AllocateFrameSinkId(), context_factory, 41 context_factory_private->AllocateFrameSinkId(), context_factory,
42 context_factory_private, CreateTaskRunner(), 42 context_factory_private, CreateTaskRunner(),
43 false /* enable_surface_synchronization */)); 43 false /* enable_surface_synchronization */,
44 false /* enable_pixel_canvas */));
44 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); 45 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget);
45 } 46 }
46 47
47 void TearDown() override { 48 void TearDown() override {
48 compositor_.reset(); 49 compositor_.reset();
49 ui::TerminateContextFactoryForTests(); 50 ui::TerminateContextFactoryForTests();
50 } 51 }
51 52
52 void DestroyCompositor() { compositor_.reset(); } 53 void DestroyCompositor() { compositor_.reset(); }
53 54
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 EXPECT_EQ(gfx::kNullAcceleratedWidget, 502 EXPECT_EQ(gfx::kNullAcceleratedWidget,
502 compositor()->ReleaseAcceleratedWidget()); 503 compositor()->ReleaseAcceleratedWidget());
503 compositor()->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); 504 compositor()->SetAcceleratedWidget(gfx::kNullAcceleratedWidget);
504 compositor()->SetVisible(true); 505 compositor()->SetVisible(true);
505 compositor()->ScheduleDraw(); 506 compositor()->ScheduleDraw();
506 DrawWaiterForTest::WaitForCompositingEnded(compositor()); 507 DrawWaiterForTest::WaitForCompositingEnded(compositor());
507 compositor()->SetRootLayer(nullptr); 508 compositor()->SetRootLayer(nullptr);
508 } 509 }
509 510
510 } // namespace ui 511 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor_switches.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698