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

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

Issue 413103002: Android WebView: Fall back to idle uploads if draw functor table not set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
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"
13 #include "ui/gl/gl_context.h" 14 #include "ui/gl/gl_context.h"
14 #include "ui/gl/gl_implementation.h" 15 #include "ui/gl/gl_implementation.h"
15 16
16 namespace gpu { 17 namespace gpu {
17 namespace { 18 namespace {
18 19
19 bool IsBroadcom() { 20 bool IsBroadcom() {
20 const char* vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR)); 21 const char* vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR));
21 if (vendor) 22 if (vendor)
22 return std::string(vendor).find("Broadcom") != std::string::npos; 23 return std::string(vendor).find("Broadcom") != std::string::npos;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 case gfx::kGLImplementationEGLGLES2: 57 case gfx::kGLImplementationEGLGLES2:
57 DCHECK(context); 58 DCHECK(context);
58 if (context->HasExtension("EGL_KHR_fence_sync") && 59 if (context->HasExtension("EGL_KHR_fence_sync") &&
59 context->HasExtension("EGL_KHR_image") && 60 context->HasExtension("EGL_KHR_image") &&
60 context->HasExtension("EGL_KHR_image_base") && 61 context->HasExtension("EGL_KHR_image_base") &&
61 context->HasExtension("EGL_KHR_gl_texture_2D_image") && 62 context->HasExtension("EGL_KHR_gl_texture_2D_image") &&
62 context->HasExtension("GL_OES_EGL_image") && 63 context->HasExtension("GL_OES_EGL_image") &&
63 !IsBroadcom() && 64 !IsBroadcom() &&
64 !IsImagination() && 65 !IsImagination() &&
65 !IsNvidia31() && 66 !IsNvidia31() &&
66 !base::SysInfo::IsLowEndDevice()) { 67 !base::SysInfo::IsLowEndDevice() &&
68 !gles2::MailboxSynchronizer::GetInstance()) {
boliu 2014/07/24 01:29:07 What does the rest of this change have to do with
no sievers 2014/07/24 16:59:39 This async upload impl does not work with mailbox
boliu 2014/07/24 17:00:59 I don't see how the functor table not being set le
no sievers 2014/07/24 19:21:26 It has nothing to do with the draw functor table.
boliu 2014/07/24 20:50:24 Oh...that wasn't obvious
67 return new AsyncPixelTransferManagerEGL; 69 return new AsyncPixelTransferManagerEGL;
68 } 70 }
69 return new AsyncPixelTransferManagerIdle; 71 return new AsyncPixelTransferManagerIdle;
70 case gfx::kGLImplementationOSMesaGL: 72 case gfx::kGLImplementationOSMesaGL:
71 return new AsyncPixelTransferManagerIdle; 73 return new AsyncPixelTransferManagerIdle;
72 case gfx::kGLImplementationMockGL: 74 case gfx::kGLImplementationMockGL:
73 return new AsyncPixelTransferManagerStub; 75 return new AsyncPixelTransferManagerStub;
74 default: 76 default:
75 NOTREACHED(); 77 NOTREACHED();
76 return NULL; 78 return NULL;
77 } 79 }
78 } 80 }
79 81
80 } // namespace gpu 82 } // namespace gpu
OLDNEW
« android_webview/lib/main/aw_main_delegate.cc ('K') | « android_webview/lib/main/aw_main_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698