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

Unified Diff: gpu/command_buffer/service/async_pixel_transfer_delegate_android.cc

Issue 16325018: GPU: Factory produces APTManagers instead of APTDelegates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/async_pixel_transfer_delegate_android.cc
diff --git a/gpu/command_buffer/service/async_pixel_transfer_delegate_android.cc b/gpu/command_buffer/service/async_pixel_transfer_delegate_android.cc
deleted file mode 100644
index fa29cf6c1e76dd18c4f24e28b1fbc61ad232e2a4..0000000000000000000000000000000000000000
--- a/gpu/command_buffer/service/async_pixel_transfer_delegate_android.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "gpu/command_buffer/service/async_pixel_transfer_delegate.h"
-
-#include "base/debug/trace_event.h"
-#include "gpu/command_buffer/service/async_pixel_transfer_delegate_egl.h"
-#include "gpu/command_buffer/service/async_pixel_transfer_delegate_stub.h"
-#include "gpu/command_buffer/service/async_pixel_transfer_delegate_sync.h"
-#include "ui/gl/gl_context.h"
-#include "ui/gl/gl_implementation.h"
-
-namespace gpu {
-namespace {
-
-bool IsBroadcom() {
- const char* vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR));
- if (vendor)
- return std::string(vendor).find("Broadcom") != std::string::npos;
- return false;
-}
-
-}
-
-// We only used threaded uploads when we can:
-// - Create EGLImages out of OpenGL textures (EGL_KHR_gl_texture_2D_image)
-// - Bind EGLImages to OpenGL textures (GL_OES_EGL_image)
-// - Use fences (to test for upload completion).
-AsyncPixelTransferDelegate* AsyncPixelTransferDelegate::Create(
- gfx::GLContext* context) {
- TRACE_EVENT0("gpu", "AsyncPixelTransferDelegate::Create");
- switch (gfx::GetGLImplementation()) {
- case gfx::kGLImplementationEGLGLES2:
- DCHECK(context);
- if (context->HasExtension("EGL_KHR_fence_sync") &&
- context->HasExtension("EGL_KHR_image") &&
- context->HasExtension("EGL_KHR_image_base") &&
- context->HasExtension("EGL_KHR_gl_texture_2D_image") &&
- context->HasExtension("GL_OES_EGL_image") &&
- !IsBroadcom()) {
- return new AsyncPixelTransferDelegateEGL;
- }
- LOG(INFO) << "Async pixel transfers not supported";
- return new AsyncPixelTransferDelegateSync;
- case gfx::kGLImplementationMockGL:
- return new AsyncPixelTransferDelegateStub;
- default:
- NOTREACHED();
- return NULL;
- }
-}
-
-} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698