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

Unified Diff: ui/gl/gl_surface_osmesa.cc

Issue 1652873002: Android: Use virtualized context only for those with compatible config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 10 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_ozone.cc » ('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 7825942f7707dfe1a404c089a72e7222a2aaab4f..e39f9bd1a87212c2c43cc4d8d8249382478195c4 100644
--- a/ui/gl/gl_surface_osmesa.cc
+++ b/ui/gl/gl_surface_osmesa.cc
@@ -15,17 +15,10 @@
namespace gfx {
-GLSurfaceOSMesa::GLSurfaceOSMesa(OSMesaSurfaceFormat format,
+GLSurfaceOSMesa::GLSurfaceOSMesa(GLSurface::Format format,
const gfx::Size& size)
- : size_(size) {
- switch (format) {
- case OSMesaSurfaceFormatBGRA:
- format_ = OSMESA_BGRA;
- break;
- case OSMesaSurfaceFormatRGBA:
- format_ = OSMESA_RGBA;
- break;
- }
+ : size_(size),
+ format_(format) {
// Implementations of OSMesa surface do not support having a 0 size. In such
// cases use a (1, 1) surface.
if (size_.GetArea() == 0)
@@ -102,7 +95,7 @@ void* GLSurfaceOSMesa::GetHandle() {
return buffer_.get();
}
-unsigned GLSurfaceOSMesa::GetFormat() {
+GLSurface::Format GLSurfaceOSMesa::GetFormat() {
return format_;
}
@@ -117,7 +110,7 @@ gfx::SwapResult GLSurfaceOSMesaHeadless::SwapBuffers() {
}
GLSurfaceOSMesaHeadless::GLSurfaceOSMesaHeadless()
- : GLSurfaceOSMesa(OSMesaSurfaceFormatBGRA, gfx::Size(1, 1)) {
+ : GLSurfaceOSMesa(SURFACE_OSMESA_BGRA, gfx::Size(1, 1)) {
}
GLSurfaceOSMesaHeadless::~GLSurfaceOSMesaHeadless() { Destroy(); }
« no previous file with comments | « ui/gl/gl_surface_osmesa.h ('k') | ui/gl/gl_surface_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698