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

Side by Side Diff: ui/compositor/test/test_compositor_host_ozone.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/test_compositor_host.h" 5 #include "ui/compositor/test/test_compositor_host.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 TestCompositorHostOzone::TestCompositorHostOzone( 78 TestCompositorHostOzone::TestCompositorHostOzone(
79 const gfx::Rect& bounds, 79 const gfx::Rect& bounds,
80 ui::ContextFactory* context_factory, 80 ui::ContextFactory* context_factory,
81 ui::ContextFactoryPrivate* context_factory_private) 81 ui::ContextFactoryPrivate* context_factory_private)
82 : bounds_(bounds), 82 : bounds_(bounds),
83 compositor_(context_factory_private->AllocateFrameSinkId(), 83 compositor_(context_factory_private->AllocateFrameSinkId(),
84 context_factory, 84 context_factory,
85 context_factory_private, 85 context_factory_private,
86 base::ThreadTaskRunnerHandle::Get(), 86 base::ThreadTaskRunnerHandle::Get(),
87 false /* enable_surface_synchronization */) {} 87 false /* enable_surface_synchronization */,
88 false /* enable_pixel_canvas */) {}
88 89
89 TestCompositorHostOzone::~TestCompositorHostOzone() {} 90 TestCompositorHostOzone::~TestCompositorHostOzone() {}
90 91
91 void TestCompositorHostOzone::Show() { 92 void TestCompositorHostOzone::Show() {
92 // Create a PlatformWindow to get the AcceleratedWidget backing it. 93 // Create a PlatformWindow to get the AcceleratedWidget backing it.
93 window_ = ui::OzonePlatform::GetInstance()->CreatePlatformWindow( 94 window_ = ui::OzonePlatform::GetInstance()->CreatePlatformWindow(
94 &window_delegate_, bounds_); 95 &window_delegate_, bounds_);
95 window_->Show(); 96 window_->Show();
96 DCHECK_NE(window_delegate_.widget(), gfx::kNullAcceleratedWidget); 97 DCHECK_NE(window_delegate_.widget(), gfx::kNullAcceleratedWidget);
97 98
(...skipping 11 matching lines...) Expand all
109 // static 110 // static
110 TestCompositorHost* TestCompositorHost::Create( 111 TestCompositorHost* TestCompositorHost::Create(
111 const gfx::Rect& bounds, 112 const gfx::Rect& bounds,
112 ui::ContextFactory* context_factory, 113 ui::ContextFactory* context_factory,
113 ui::ContextFactoryPrivate* context_factory_private) { 114 ui::ContextFactoryPrivate* context_factory_private) {
114 return new TestCompositorHostOzone(bounds, context_factory, 115 return new TestCompositorHostOzone(bounds, context_factory,
115 context_factory_private); 116 context_factory_private);
116 } 117 }
117 118
118 } // namespace ui 119 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/test_compositor_host_mac.mm ('k') | ui/compositor/test/test_compositor_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698