summaryrefslogtreecommitdiffstats
path: root/ui/gl/gl_image_ozone.cc
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-18 15:40:59 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-18 15:40:59 +0000
commitb63f1d6dc0569a970a43c5a456d38cd543eea27c (patch)
treef3dd7ee9d94aafb84caab814c189c22662c53d6a /ui/gl/gl_image_ozone.cc
parent602b5a29f74202a4c36acfedcf1562f78abfce3c (diff)
downloadchromium_src-b63f1d6dc0569a970a43c5a456d38cd543eea27c.zip
chromium_src-b63f1d6dc0569a970a43c5a456d38cd543eea27c.tar.gz
chromium_src-b63f1d6dc0569a970a43c5a456d38cd543eea27c.tar.bz2
gpu: Remove Create/DeleteImage IPC by adding an X11_PIXMAP_BUFFER GpuMemoryBuffer type.
This adds a new GpuMemoryBuffer type that can be used to create a GpuMemoryBuffer from an existing X11 pixmap. This removes Create/DeleteImage IPC and reduces complexity significantly as it allows the ImageManager to be moved to the decoder and simply track images. A new platform dependent GpuMemoryBufferFactory interface is introduced to allow this new type of buffer to be created on the GPU service side. To avoid the need for any global variables, this factory instance is also responsible for creating GLImage instances. The old factory interface used by android_webview is renamed InProcessGpuMemoryBufferFactory until it can be removed in favor of this new interface. BUG=368716 TEST=gpu_unittests, gl_tests --gtest_filter=GpuMemoryBufferTest.Lifecycle Review URL: https://codereview.chromium.org/331723003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284097 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gl/gl_image_ozone.cc')
-rw-r--r--ui/gl/gl_image_ozone.cc47
1 files changed, 0 insertions, 47 deletions
diff --git a/ui/gl/gl_image_ozone.cc b/ui/gl/gl_image_ozone.cc
deleted file mode 100644
index a1c1329..0000000
--- a/ui/gl/gl_image_ozone.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2012 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 "ui/gl/gl_image.h"
-
-#include "base/debug/trace_event.h"
-#include "ui/gl/gl_image_egl.h"
-#include "ui/gl/gl_image_stub.h"
-#include "ui/gl/gl_implementation.h"
-
-namespace gfx {
-
-scoped_refptr<GLImage> GLImage::CreateGLImage(gfx::PluginWindowHandle window) {
- TRACE_EVENT0("gpu", "GLImage::CreateGLImage");
- switch (GetGLImplementation()) {
- case kGLImplementationOSMesaGL:
- return NULL;
- case kGLImplementationEGLGLES2:
- return NULL;
- case kGLImplementationMockGL:
- return new GLImageStub;
- default:
- NOTREACHED();
- return NULL;
- }
-}
-
-scoped_refptr<GLImage> GLImage::CreateGLImageForGpuMemoryBuffer(
- gfx::GpuMemoryBufferHandle buffer,
- gfx::Size size,
- unsigned internalformat) {
- TRACE_EVENT0("gpu", "GLImage::CreateGLImageForGpuMemoryBuffer");
- switch (GetGLImplementation()) {
- case kGLImplementationOSMesaGL:
- return NULL;
- case kGLImplementationEGLGLES2:
- return NULL;
- case kGLImplementationMockGL:
- return new GLImageStub;
- default:
- NOTREACHED();
- return NULL;
- }
-}
-
-} // namespace gfx