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

Side by Side Diff: ui/gl/gl_surface_egl.cc

Issue 2820643002: Decouple some graphics-related IsLowEndDevice() policies for 1GB devices. (Closed)
Patch Set: Rebase Created 3 years, 8 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 | « media/gpu/android_video_decode_accelerator.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gl/gl_surface_egl.h" 5 #include "ui/gl/gl_surface_egl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 } 1076 }
1077 1077
1078 bool PbufferGLSurfaceEGL::Initialize(GLSurfaceFormat format) { 1078 bool PbufferGLSurfaceEGL::Initialize(GLSurfaceFormat format) {
1079 EGLSurface old_surface = surface_; 1079 EGLSurface old_surface = surface_;
1080 1080
1081 #if defined(OS_ANDROID) 1081 #if defined(OS_ANDROID)
1082 // This is to allow context virtualization which requires on- and offscreen 1082 // This is to allow context virtualization which requires on- and offscreen
1083 // to use a compatible config. We expect the client to request RGB565 1083 // to use a compatible config. We expect the client to request RGB565
1084 // onscreen surface also for this to work (with the exception of 1084 // onscreen surface also for this to work (with the exception of
1085 // fullscreen video). 1085 // fullscreen video).
1086 if (base::SysInfo::IsLowEndDevice()) 1086 if (base::SysInfo::AmountOfPhysicalMemoryMB() <= 512)
1087 format.SetRGB565(); 1087 format.SetRGB565();
1088 #endif 1088 #endif
1089 1089
1090 format_ = format; 1090 format_ = format;
1091 1091
1092 EGLDisplay display = GetDisplay(); 1092 EGLDisplay display = GetDisplay();
1093 if (!display) { 1093 if (!display) {
1094 LOG(ERROR) << "Trying to create surface with invalid display."; 1094 LOG(ERROR) << "Trying to create surface with invalid display.";
1095 return false; 1095 return false;
1096 } 1096 }
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 } 1246 }
1247 1247
1248 void* SurfacelessEGL::GetShareHandle() { 1248 void* SurfacelessEGL::GetShareHandle() {
1249 return NULL; 1249 return NULL;
1250 } 1250 }
1251 1251
1252 SurfacelessEGL::~SurfacelessEGL() { 1252 SurfacelessEGL::~SurfacelessEGL() {
1253 } 1253 }
1254 1254
1255 } // namespace gl 1255 } // namespace gl
OLDNEW
« no previous file with comments | « media/gpu/android_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698