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

Unified Diff: ui/gl/gl_surface_osmesa.cc

Issue 2616723002: Refactor GL surface format handling (Closed)
Patch Set: Fix copyright notice on new files Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_surface_osmesa.h ('k') | ui/gl/gl_surface_osmesa_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_osmesa.cc
diff --git a/ui/gl/gl_surface_osmesa.cc b/ui/gl/gl_surface_osmesa.cc
index 7a62f25a5359104c9959008f6f5b9cad346c8d3f..741f535696f9b367aed02fb8a7328f9b239851ec 100644
--- a/ui/gl/gl_surface_osmesa.cc
+++ b/ui/gl/gl_surface_osmesa.cc
@@ -15,7 +15,7 @@
namespace gl {
-GLSurfaceOSMesa::GLSurfaceOSMesa(GLSurface::Format format,
+GLSurfaceOSMesa::GLSurfaceOSMesa(GLSurfaceFormat format,
const gfx::Size& size)
: size_(size),
format_(format) {
@@ -25,7 +25,7 @@ GLSurfaceOSMesa::GLSurfaceOSMesa(GLSurface::Format format,
size_.SetSize(1, 1);
}
-bool GLSurfaceOSMesa::Initialize(GLSurface::Format format) {
+bool GLSurfaceOSMesa::Initialize(GLSurfaceFormat format) {
return Resize(size_, 1.f, true);
}
@@ -95,7 +95,7 @@ void* GLSurfaceOSMesa::GetHandle() {
return buffer_.get();
}
-GLSurface::Format GLSurfaceOSMesa::GetFormat() {
+GLSurfaceFormat GLSurfaceOSMesa::GetFormat() {
return format_;
}
@@ -110,7 +110,9 @@ gfx::SwapResult GLSurfaceOSMesaHeadless::SwapBuffers() {
}
GLSurfaceOSMesaHeadless::GLSurfaceOSMesaHeadless()
- : GLSurfaceOSMesa(SURFACE_OSMESA_BGRA, gfx::Size(1, 1)) {
+ : GLSurfaceOSMesa(
+ GLSurfaceFormat(GLSurfaceFormat::PIXEL_LAYOUT_BGRA),
+ gfx::Size(1, 1)) {
}
GLSurfaceOSMesaHeadless::~GLSurfaceOSMesaHeadless() { Destroy(); }
« no previous file with comments | « ui/gl/gl_surface_osmesa.h ('k') | ui/gl/gl_surface_osmesa_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698