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

Side by Side Diff: ui/ozone/platform/cast/surface_factory_cast.cc

Issue 1269503007: Unify graphics buffer format & usage enums for GpuMemoryBuffer & SurfaceFactoryOzone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add header to BUILD.gn Created 5 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/ozone/platform/cast/surface_factory_cast.h ('k') | ui/ozone/platform/drm/gpu/gbm_buffer.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 "ui/ozone/platform/cast/surface_factory_cast.h" 5 #include "ui/ozone/platform/cast/surface_factory_cast.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "chromecast/public/cast_egl_platform.h" 8 #include "chromecast/public/cast_egl_platform.h"
9 #include "chromecast/public/graphics_types.h" 9 #include "chromecast/public/graphics_types.h"
10 #include "ui/gfx/geometry/quad_f.h" 10 #include "ui/gfx/geometry/quad_f.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 const int32* SurfaceFactoryCast::GetEGLSurfaceProperties( 183 const int32* SurfaceFactoryCast::GetEGLSurfaceProperties(
184 const int32* desired_list) { 184 const int32* desired_list) {
185 return egl_platform_->GetEGLSurfaceProperties(desired_list); 185 return egl_platform_->GetEGLSurfaceProperties(desired_list);
186 } 186 }
187 187
188 scoped_refptr<NativePixmap> SurfaceFactoryCast::CreateNativePixmap( 188 scoped_refptr<NativePixmap> SurfaceFactoryCast::CreateNativePixmap(
189 gfx::AcceleratedWidget w, 189 gfx::AcceleratedWidget w,
190 gfx::Size size, 190 gfx::Size size,
191 BufferFormat format, 191 gfx::BufferFormat format,
192 BufferUsage usage) { 192 gfx::BufferUsage usage) {
193 class CastPixmap : public NativePixmap { 193 class CastPixmap : public NativePixmap {
194 public: 194 public:
195 CastPixmap() {} 195 CastPixmap() {}
196 196
197 void* GetEGLClientBuffer() override { 197 void* GetEGLClientBuffer() override {
198 // TODO(halliwell): try to implement this through CastEglPlatform. 198 // TODO(halliwell): try to implement this through CastEglPlatform.
199 return nullptr; 199 return nullptr;
200 } 200 }
201 int GetDmaBufFd() override { return 0; } 201 int GetDmaBufFd() override { return 0; }
202 int GetDmaBufPitch() override { return 0; } 202 int GetDmaBufPitch() override { return 0; }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 return false; 237 return false;
238 } 238 }
239 239
240 set_gl_get_proc_address.Run(gl_proc); 240 set_gl_get_proc_address.Run(gl_proc);
241 add_gl_library.Run(lib_egl); 241 add_gl_library.Run(lib_egl);
242 add_gl_library.Run(lib_gles2); 242 add_gl_library.Run(lib_gles2);
243 return true; 243 return true;
244 } 244 }
245 245
246 } // namespace ui 246 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/cast/surface_factory_cast.h ('k') | ui/ozone/platform/drm/gpu/gbm_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698