| OLD | NEW |
| 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" |
| 7 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 8 #include "gpu/command_buffer/service/async_pixel_transfer_manager_egl.h" | 9 #include "gpu/command_buffer/service/async_pixel_transfer_manager_egl.h" |
| 9 #include "gpu/command_buffer/service/async_pixel_transfer_manager_idle.h" | 10 #include "gpu/command_buffer/service/async_pixel_transfer_manager_idle.h" |
| 10 #include "gpu/command_buffer/service/async_pixel_transfer_manager_stub.h" | 11 #include "gpu/command_buffer/service/async_pixel_transfer_manager_stub.h" |
| 11 #include "gpu/command_buffer/service/async_pixel_transfer_manager_sync.h" | 12 #include "gpu/command_buffer/service/async_pixel_transfer_manager_sync.h" |
| 12 #include "ui/gl/gl_context.h" | 13 #include "ui/gl/gl_context.h" |
| 13 #include "ui/gl/gl_implementation.h" | 14 #include "ui/gl/gl_implementation.h" |
| 14 | 15 |
| 15 namespace gpu { | 16 namespace gpu { |
| 16 namespace { | 17 namespace { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 43 TRACE_EVENT0("gpu", "AsyncPixelTransferManager::Create"); | 44 TRACE_EVENT0("gpu", "AsyncPixelTransferManager::Create"); |
| 44 switch (gfx::GetGLImplementation()) { | 45 switch (gfx::GetGLImplementation()) { |
| 45 case gfx::kGLImplementationEGLGLES2: | 46 case gfx::kGLImplementationEGLGLES2: |
| 46 DCHECK(context); | 47 DCHECK(context); |
| 47 if (context->HasExtension("EGL_KHR_fence_sync") && | 48 if (context->HasExtension("EGL_KHR_fence_sync") && |
| 48 context->HasExtension("EGL_KHR_image") && | 49 context->HasExtension("EGL_KHR_image") && |
| 49 context->HasExtension("EGL_KHR_image_base") && | 50 context->HasExtension("EGL_KHR_image_base") && |
| 50 context->HasExtension("EGL_KHR_gl_texture_2D_image") && | 51 context->HasExtension("EGL_KHR_gl_texture_2D_image") && |
| 51 context->HasExtension("GL_OES_EGL_image") && | 52 context->HasExtension("GL_OES_EGL_image") && |
| 52 !IsBroadcom() && | 53 !IsBroadcom() && |
| 53 !IsImagination()) { | 54 !IsImagination() && |
| 55 !base::android::SysUtils::IsLowEndDevice()) { |
| 54 return new AsyncPixelTransferManagerEGL; | 56 return new AsyncPixelTransferManagerEGL; |
| 55 } | 57 } |
| 56 LOG(INFO) << "Async pixel transfers not supported"; | 58 LOG(INFO) << "Async pixel transfers not supported"; |
| 57 return new AsyncPixelTransferManagerIdle; | 59 return new AsyncPixelTransferManagerIdle; |
| 58 case gfx::kGLImplementationMockGL: | 60 case gfx::kGLImplementationMockGL: |
| 59 return new AsyncPixelTransferManagerStub; | 61 return new AsyncPixelTransferManagerStub; |
| 60 default: | 62 default: |
| 61 NOTREACHED(); | 63 NOTREACHED(); |
| 62 return NULL; | 64 return NULL; |
| 63 } | 65 } |
| 64 } | 66 } |
| 65 | 67 |
| 66 } // namespace gpu | 68 } // namespace gpu |
| OLD | NEW |