diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-07 00:33:04 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-07 00:33:04 +0000 |
commit | 328ce55f74ce4316a4fbb1286be14bf603e841e6 (patch) | |
tree | dda8a6ff77f9828dad816d6b02a21e65605f9f1f /ui/gfx/surface | |
parent | 9d7a49d744c7431eded94842d9bab9f7eae7c7b6 (diff) | |
download | chromium_src-328ce55f74ce4316a4fbb1286be14bf603e841e6.zip chromium_src-328ce55f74ce4316a4fbb1286be14bf603e841e6.tar.gz chromium_src-328ce55f74ce4316a4fbb1286be14bf603e841e6.tar.bz2 |
Remove WAYLAND port
Also removed skia/ext/canvas_paint_x.h which is not in use.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10009024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131219 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/surface')
-rw-r--r-- | ui/gfx/surface/accelerated_surface_wayland.cc | 48 | ||||
-rw-r--r-- | ui/gfx/surface/accelerated_surface_wayland.h | 39 | ||||
-rw-r--r-- | ui/gfx/surface/surface.gyp | 2 |
3 files changed, 0 insertions, 89 deletions
diff --git a/ui/gfx/surface/accelerated_surface_wayland.cc b/ui/gfx/surface/accelerated_surface_wayland.cc deleted file mode 100644 index a83fb78..0000000 --- a/ui/gfx/surface/accelerated_surface_wayland.cc +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2011 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/gfx/surface/accelerated_surface_wayland.h" - -#include <wayland-egl.h> - -#include "third_party/angle/include/EGL/egl.h" -#include "third_party/angle/include/EGL/eglext.h" -#include "ui/gfx/gl/gl_bindings.h" -#include "ui/gfx/gl/gl_surface_egl.h" -#include "ui/wayland/wayland_display.h" - -AcceleratedSurface::AcceleratedSurface(const gfx::Size& size) - : size_(size), - image_(NULL), - pixmap_(NULL), - texture_(0) { - EGLDisplay edpy = gfx::GLSurfaceEGL::GetHardwareDisplay(); - - pixmap_ = wl_egl_pixmap_create(size_.width(), - size_.height(), - 0); - - image_ = eglCreateImageKHR( - edpy, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, (void*) pixmap_, NULL); - - glGenTextures(1, &texture_); - - GLint current_texture = 0; - glGetIntegerv(GL_TEXTURE_BINDING_2D, ¤t_texture); - - glBindTexture(GL_TEXTURE_2D, texture_); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image_); - - glBindTexture(GL_TEXTURE_2D, current_texture); -} - -AcceleratedSurface::~AcceleratedSurface() { - glDeleteTextures(1, &texture_); - eglDestroyImageKHR(gfx::GLSurfaceEGL::GetHardwareDisplay(), image_); - wl_egl_pixmap_destroy(pixmap_); -} diff --git a/ui/gfx/surface/accelerated_surface_wayland.h b/ui/gfx/surface/accelerated_surface_wayland.h deleted file mode 100644 index 3deda3c..0000000 --- a/ui/gfx/surface/accelerated_surface_wayland.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef UI_GFX_SURFACE_ACCELERATED_SURFACE_LINUX_H_ -#define UI_GFX_SURFACE_ACCELERATED_SURFACE_LINUX_H_ -#pragma once - -#include "base/memory/ref_counted.h" -#include "ui/gfx/size.h" -#include "ui/gfx/surface/surface_export.h" - -struct wl_egl_pixmap; - -// The GL context associated with the surface must be current when -// an instance is created or destroyed. -class SURFACE_EXPORT AcceleratedSurface - : public base::RefCounted<AcceleratedSurface> { - public: - AcceleratedSurface(const gfx::Size& size); - const gfx::Size& size() const { return size_; } - // The pointer returned is owned by this object - wl_egl_pixmap* pixmap() const { return pixmap_; } - uint32 texture() const { return texture_; } - - private: - friend class base::RefCounted<AcceleratedSurface>; - - ~AcceleratedSurface(); - - gfx::Size size_; - void* image_; - wl_egl_pixmap* pixmap_; - uint32 texture_; - - DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); -}; - -#endif // UI_GFX_SURFACE_ACCELERATED_SURFACE_LINUX_H_ diff --git a/ui/gfx/surface/surface.gyp b/ui/gfx/surface/surface.gyp index 02ab651..e11c492 100644 --- a/ui/gfx/surface/surface.gyp +++ b/ui/gfx/surface/surface.gyp @@ -30,8 +30,6 @@ 'sources': [ 'accelerated_surface_mac.cc', 'accelerated_surface_mac.h', - 'accelerated_surface_wayland.cc', - 'accelerated_surface_wayland.h', 'accelerated_surface_win.cc', 'accelerated_surface_win.h', 'io_surface_support_mac.cc', |