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

Side by Side Diff: ui/aura/window_tree_host_ozone.cc

Issue 205433002: ozone: Add OzoneSurface object that is owned by compositor, GLSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/compositor/software_output_device_ozone.cc ('k') | ui/gfx/gfx.gyp » ('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 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/aura/window_tree_host_ozone.h" 5 #include "ui/aura/window_tree_host_ozone.h"
6 6
7 #include "ui/aura/window_event_dispatcher.h" 7 #include "ui/aura/window_event_dispatcher.h"
8 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" 8 #include "ui/base/cursor/ozone/cursor_factory_ozone.h"
9 #include "ui/events/ozone/event_factory_ozone.h" 9 #include "ui/events/ozone/event_factory_ozone.h"
10 #include "ui/gfx/ozone/surface_factory_ozone.h" 10 #include "ui/gfx/ozone/surface_factory_ozone.h"
11 #include "ui/ozone/ozone_platform.h" 11 #include "ui/ozone/ozone_platform.h"
12 12
13 namespace aura { 13 namespace aura {
14 14
15 WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds) 15 WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds)
16 : widget_(0), 16 : widget_(0),
17 bounds_(bounds) { 17 bounds_(bounds) {
18 ui::OzonePlatform::Initialize(); 18 ui::OzonePlatform::Initialize();
19 19
20 // EventFactoryOzone creates converters that obtain input events from the 20 // EventFactoryOzone creates converters that obtain input events from the
21 // underlying input system and dispatch them as |ui::Event| instances into 21 // underlying input system and dispatch them as |ui::Event| instances into
22 // Aura. 22 // Aura.
23 ui::EventFactoryOzone::GetInstance()->StartProcessingEvents(); 23 ui::EventFactoryOzone::GetInstance()->StartProcessingEvents();
24 24
25 gfx::SurfaceFactoryOzone* surface_factory = 25 gfx::SurfaceFactoryOzone* surface_factory =
26 gfx::SurfaceFactoryOzone::GetInstance(); 26 gfx::SurfaceFactoryOzone::GetInstance();
27 widget_ = surface_factory->GetAcceleratedWidget(); 27 widget_ = surface_factory->GetAcceleratedWidget();
28 28
29 surface_factory->AttemptToResizeAcceleratedWidget(widget_, bounds_);
30
31 base::MessagePumpOzone::Current()->AddDispatcherForRootWindow(this); 29 base::MessagePumpOzone::Current()->AddDispatcherForRootWindow(this);
32 CreateCompositor(GetAcceleratedWidget()); 30 CreateCompositor(GetAcceleratedWidget());
33 } 31 }
34 32
35 WindowTreeHostOzone::~WindowTreeHostOzone() { 33 WindowTreeHostOzone::~WindowTreeHostOzone() {
36 base::MessagePumpOzone::Current()->RemoveDispatcherForRootWindow(0); 34 base::MessagePumpOzone::Current()->RemoveDispatcherForRootWindow(0);
37 DestroyCompositor(); 35 DestroyCompositor();
38 DestroyDispatcher(); 36 DestroyDispatcher();
39 } 37 }
40 38
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return new WindowTreeHostOzone(bounds); 117 return new WindowTreeHostOzone(bounds);
120 } 118 }
121 119
122 // static 120 // static
123 gfx::Size WindowTreeHost::GetNativeScreenSize() { 121 gfx::Size WindowTreeHost::GetNativeScreenSize() {
124 NOTIMPLEMENTED(); 122 NOTIMPLEMENTED();
125 return gfx::Size(); 123 return gfx::Size();
126 } 124 }
127 125
128 } // namespace aura 126 } // namespace aura
OLDNEW
« no previous file with comments | « content/browser/compositor/software_output_device_ozone.cc ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698