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

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

Issue 119493005: Expose a low-end device mode override flags for non-android OSs as well (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Put low end device detection under the flag for all platforms except android. Created 6 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 unified diff | Download patch
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_utils.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 28 matching lines...) Expand all
47 switch (gfx::GetGLImplementation()) { 47 switch (gfx::GetGLImplementation()) {
48 case gfx::kGLImplementationEGLGLES2: 48 case gfx::kGLImplementationEGLGLES2:
49 DCHECK(context); 49 DCHECK(context);
50 if (context->HasExtension("EGL_KHR_fence_sync") && 50 if (context->HasExtension("EGL_KHR_fence_sync") &&
51 context->HasExtension("EGL_KHR_image") && 51 context->HasExtension("EGL_KHR_image") &&
52 context->HasExtension("EGL_KHR_image_base") && 52 context->HasExtension("EGL_KHR_image_base") &&
53 context->HasExtension("EGL_KHR_gl_texture_2D_image") && 53 context->HasExtension("EGL_KHR_gl_texture_2D_image") &&
54 context->HasExtension("GL_OES_EGL_image") && 54 context->HasExtension("GL_OES_EGL_image") &&
55 !IsBroadcom() && 55 !IsBroadcom() &&
56 !IsImagination() && 56 !IsImagination() &&
57 !base::android::SysUtils::IsLowEndDevice()) { 57 !base::SysUtils::IsLowEndDevice()) {
58 return new AsyncPixelTransferManagerEGL; 58 return new AsyncPixelTransferManagerEGL;
59 } 59 }
60 LOG(INFO) << "Async pixel transfers not supported"; 60 LOG(INFO) << "Async pixel transfers not supported";
61 return new AsyncPixelTransferManagerIdle; 61 return new AsyncPixelTransferManagerIdle;
62 case gfx::kGLImplementationMockGL: 62 case gfx::kGLImplementationMockGL:
63 return new AsyncPixelTransferManagerStub; 63 return new AsyncPixelTransferManagerStub;
64 default: 64 default:
65 NOTREACHED(); 65 NOTREACHED();
66 return NULL; 66 return NULL;
67 } 67 }
68 } 68 }
69 69
70 } // namespace gpu 70 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698