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

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

Issue 545043003: ozone: dri: Implement cursor animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops, undid it wrong Created 6 years, 3 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/ozone/platform/dri/dri_surface_factory.cc ('k') | no next file » | 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/ozone/platform/dri/gbm_surface_factory.h" 5 #include "ui/ozone/platform/dri/gbm_surface_factory.h"
6 6
7 #include <gbm.h> 7 #include <gbm.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 return true; 144 return true;
145 } 145 }
146 146
147 scoped_ptr<SurfaceOzoneEGL> GbmSurfaceFactory::CreateEGLSurfaceForWidget( 147 scoped_ptr<SurfaceOzoneEGL> GbmSurfaceFactory::CreateEGLSurfaceForWidget(
148 gfx::AcceleratedWidget widget) { 148 gfx::AcceleratedWidget widget) {
149 DCHECK(state_ == INITIALIZED); 149 DCHECK(state_ == INITIALIZED);
150 150
151 DriWindowDelegate* delegate = GetOrCreateWindowDelegate(widget); 151 DriWindowDelegate* delegate = GetOrCreateWindowDelegate(widget);
152 152
153 ResetCursor(widget);
154
155 scoped_ptr<GbmSurface> surface(new GbmSurface(delegate, device_, drm_)); 153 scoped_ptr<GbmSurface> surface(new GbmSurface(delegate, device_, drm_));
156 if (!surface->Initialize()) 154 if (!surface->Initialize())
157 return scoped_ptr<SurfaceOzoneEGL>(); 155 return scoped_ptr<SurfaceOzoneEGL>();
158 156
159 return surface.PassAs<SurfaceOzoneEGL>(); 157 return surface.PassAs<SurfaceOzoneEGL>();
160 } 158 }
161 159
162 scoped_ptr<SurfaceOzoneEGL> 160 scoped_ptr<SurfaceOzoneEGL>
163 GbmSurfaceFactory::CreateSurfacelessEGLSurfaceForWidget( 161 GbmSurfaceFactory::CreateSurfacelessEGLSurfaceForWidget(
164 gfx::AcceleratedWidget widget) { 162 gfx::AcceleratedWidget widget) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 scoped_ptr<DriWindowDelegate> delegate( 221 scoped_ptr<DriWindowDelegate> delegate(
224 new DriWindowDelegateImpl(widget, screen_manager_)); 222 new DriWindowDelegateImpl(widget, screen_manager_));
225 delegate->Initialize(); 223 delegate->Initialize();
226 window_manager_->AddWindowDelegate(widget, delegate.Pass()); 224 window_manager_->AddWindowDelegate(widget, delegate.Pass());
227 } 225 }
228 226
229 return window_manager_->GetWindowDelegate(widget); 227 return window_manager_->GetWindowDelegate(widget);
230 } 228 }
231 229
232 } // namespace ui 230 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_surface_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698