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

Side by Side Diff: gpu/command_buffer/service/async_pixel_transfer_manager_android.cc

Issue 258663002: Expose a low-end device mode override flags for non-android OSs as well (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments. Created 6 years, 6 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 | « content/renderer/renderer_main.cc ('k') | ui/gl/gl_context_android.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "gpu/command_buffer/service/async_pixel_transfer_manager.h" 5 #include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
6 6
7 #include "base/android/sys_utils.h"
8 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/sys_info.h"
9 #include "gpu/command_buffer/service/async_pixel_transfer_manager_egl.h" 9 #include "gpu/command_buffer/service/async_pixel_transfer_manager_egl.h"
10 #include "gpu/command_buffer/service/async_pixel_transfer_manager_idle.h" 10 #include "gpu/command_buffer/service/async_pixel_transfer_manager_idle.h"
11 #include "gpu/command_buffer/service/async_pixel_transfer_manager_stub.h" 11 #include "gpu/command_buffer/service/async_pixel_transfer_manager_stub.h"
12 #include "gpu/command_buffer/service/async_pixel_transfer_manager_sync.h" 12 #include "gpu/command_buffer/service/async_pixel_transfer_manager_sync.h"
13 #include "ui/gl/gl_context.h" 13 #include "ui/gl/gl_context.h"
14 #include "ui/gl/gl_implementation.h" 14 #include "ui/gl/gl_implementation.h"
15 15
16 namespace gpu { 16 namespace gpu {
17 namespace { 17 namespace {
18 18
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 case gfx::kGLImplementationEGLGLES2: 56 case gfx::kGLImplementationEGLGLES2:
57 DCHECK(context); 57 DCHECK(context);
58 if (context->HasExtension("EGL_KHR_fence_sync") && 58 if (context->HasExtension("EGL_KHR_fence_sync") &&
59 context->HasExtension("EGL_KHR_image") && 59 context->HasExtension("EGL_KHR_image") &&
60 context->HasExtension("EGL_KHR_image_base") && 60 context->HasExtension("EGL_KHR_image_base") &&
61 context->HasExtension("EGL_KHR_gl_texture_2D_image") && 61 context->HasExtension("EGL_KHR_gl_texture_2D_image") &&
62 context->HasExtension("GL_OES_EGL_image") && 62 context->HasExtension("GL_OES_EGL_image") &&
63 !IsBroadcom() && 63 !IsBroadcom() &&
64 !IsImagination() && 64 !IsImagination() &&
65 !IsNvidia31() && 65 !IsNvidia31() &&
66 !base::android::SysUtils::IsLowEndDevice()) { 66 !base::SysInfo::IsLowEndDevice()) {
67 return new AsyncPixelTransferManagerEGL; 67 return new AsyncPixelTransferManagerEGL;
68 } 68 }
69 return new AsyncPixelTransferManagerIdle; 69 return new AsyncPixelTransferManagerIdle;
70 case gfx::kGLImplementationOSMesaGL: 70 case gfx::kGLImplementationOSMesaGL:
71 return new AsyncPixelTransferManagerIdle; 71 return new AsyncPixelTransferManagerIdle;
72 case gfx::kGLImplementationMockGL: 72 case gfx::kGLImplementationMockGL:
73 return new AsyncPixelTransferManagerStub; 73 return new AsyncPixelTransferManagerStub;
74 default: 74 default:
75 NOTREACHED(); 75 NOTREACHED();
76 return NULL; 76 return NULL;
77 } 77 }
78 } 78 }
79 79
80 } // namespace gpu 80 } // namespace gpu
OLDNEW
« no previous file with comments | « content/renderer/renderer_main.cc ('k') | ui/gl/gl_context_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698