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

Side by Side Diff: ui/ozone/platform/dri/dri_surface_factory.cc

Issue 275263002: [wip] ozonex: X11 backend for ozone. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 6 years, 6 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
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/ozone/platform/dri/dri_surface_factory.h" 5 #include "ui/ozone/platform/dri/dri_surface_factory.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 state_ = INITIALIZED; 148 state_ = INITIALIZED;
149 return state_; 149 return state_;
150 } 150 }
151 151
152 void DriSurfaceFactory::ShutdownHardware() { 152 void DriSurfaceFactory::ShutdownHardware() {
153 CHECK(state_ == INITIALIZED); 153 CHECK(state_ == INITIALIZED);
154 state_ = UNINITIALIZED; 154 state_ = UNINITIALIZED;
155 } 155 }
156 156
157 gfx::AcceleratedWidget DriSurfaceFactory::GetAcceleratedWidget() { 157 gfx::AcceleratedWidget DriSurfaceFactory::CreatePlatformWindow(
158 ui::PlatformWindowDelegate* delegate) {
158 CHECK(state_ != FAILED); 159 CHECK(state_ != FAILED);
159 160
160 // We're not using 0 since other code assumes that a 0 AcceleratedWidget is an 161 // We're not using 0 since other code assumes that a 0 AcceleratedWidget is an
161 // invalid widget. 162 // invalid widget.
162 return ++allocated_widgets_; 163 return ++allocated_widgets_;
163 } 164 }
164 165
165 scoped_ptr<gfx::SurfaceOzoneCanvas> DriSurfaceFactory::CreateCanvasForWidget( 166 scoped_ptr<gfx::SurfaceOzoneCanvas> DriSurfaceFactory::CreateCanvasForWidget(
166 gfx::AcceleratedWidget w) { 167 gfx::AcceleratedWidget w) {
167 CHECK(state_ == INITIALIZED); 168 CHECK(state_ == INITIALIZED);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 controller->SetCursor(cursor_surface_.get()); 244 controller->SetCursor(cursor_surface_.get());
244 } 245 }
245 } else { 246 } else {
246 // No cursor set. 247 // No cursor set.
247 if (controller) 248 if (controller)
248 controller->UnsetCursor(); 249 controller->UnsetCursor();
249 } 250 }
250 } 251 }
251 252
252 } // namespace ui 253 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_surface_factory.h ('k') | ui/ozone/platform/egltest/ozone_platform_egltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698