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

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

Issue 463563002: Enable async upload egl with mailbox synchronizer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 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/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/sys_info.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 "gpu/command_buffer/service/mailbox_synchronizer.h"
14 #include "ui/gl/gl_context.h" 13 #include "ui/gl/gl_context.h"
15 #include "ui/gl/gl_implementation.h" 14 #include "ui/gl/gl_implementation.h"
16 15
17 namespace gpu { 16 namespace gpu {
18 namespace { 17 namespace {
19 18
20 bool IsBroadcom() { 19 bool IsBroadcom() {
21 const char* vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR)); 20 const char* vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR));
22 if (vendor) 21 if (vendor)
23 return std::string(vendor).find("Broadcom") != std::string::npos; 22 return std::string(vendor).find("Broadcom") != std::string::npos;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 case gfx::kGLImplementationEGLGLES2: 56 case gfx::kGLImplementationEGLGLES2:
58 DCHECK(context); 57 DCHECK(context);
59 if (context->HasExtension("EGL_KHR_fence_sync") && 58 if (context->HasExtension("EGL_KHR_fence_sync") &&
60 context->HasExtension("EGL_KHR_image") && 59 context->HasExtension("EGL_KHR_image") &&
61 context->HasExtension("EGL_KHR_image_base") && 60 context->HasExtension("EGL_KHR_image_base") &&
62 context->HasExtension("EGL_KHR_gl_texture_2D_image") && 61 context->HasExtension("EGL_KHR_gl_texture_2D_image") &&
63 context->HasExtension("GL_OES_EGL_image") && 62 context->HasExtension("GL_OES_EGL_image") &&
64 !IsBroadcom() && 63 !IsBroadcom() &&
65 !IsImagination() && 64 !IsImagination() &&
66 !IsNvidia31() && 65 !IsNvidia31() &&
67 !base::SysInfo::IsLowEndDevice() && 66 !base::SysInfo::IsLowEndDevice()) {
68 !gles2::MailboxSynchronizer::GetInstance()) {
69 return new AsyncPixelTransferManagerEGL; 67 return new AsyncPixelTransferManagerEGL;
70 } 68 }
71 return new AsyncPixelTransferManagerIdle; 69 return new AsyncPixelTransferManagerIdle;
72 case gfx::kGLImplementationOSMesaGL: 70 case gfx::kGLImplementationOSMesaGL:
73 return new AsyncPixelTransferManagerIdle; 71 return new AsyncPixelTransferManagerIdle;
74 case gfx::kGLImplementationMockGL: 72 case gfx::kGLImplementationMockGL:
75 return new AsyncPixelTransferManagerStub; 73 return new AsyncPixelTransferManagerStub;
76 default: 74 default:
77 NOTREACHED(); 75 NOTREACHED();
78 return NULL; 76 return NULL;
79 } 77 }
80 } 78 }
81 79
82 } // namespace gpu 80 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698