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

Unified Diff: ui/gfx/gl/gl_surface_egl.h

Issue 10392068: ui: Move gl/ directory out of gfx/, up to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac_rel Created 8 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
« no previous file with comments | « ui/gfx/gl/gl_surface_cgl.cc ('k') | ui/gfx/gl/gl_surface_egl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gl/gl_surface_egl.h
diff --git a/ui/gfx/gl/gl_surface_egl.h b/ui/gfx/gl/gl_surface_egl.h
deleted file mode 100644
index a4a010b34871e771060abccbd9f61d4a7659d468..0000000000000000000000000000000000000000
--- a/ui/gfx/gl/gl_surface_egl.h
+++ /dev/null
@@ -1,106 +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.
-
-#ifndef UI_GFX_GL_GL_SURFACE_EGL_H_
-#define UI_GFX_GL_GL_SURFACE_EGL_H_
-#pragma once
-
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
-
-#include "base/compiler_specific.h"
-#include "ui/gfx/gl/gl_surface.h"
-#include "ui/gfx/native_widget_types.h"
-#include "ui/gfx/size.h"
-
-typedef void* EGLConfig;
-typedef void* EGLDisplay;
-typedef void* EGLSurface;
-
-#if defined(OS_ANDROID)
-typedef void* EGLNativeDisplayType;
-#elif defined(OS_WIN)
-typedef HDC EGLNativeDisplayType;
-#else
-typedef struct _XDisplay* EGLNativeDisplayType;
-#endif
-
-namespace gfx {
-
-// Interface for EGL surface.
-class GL_EXPORT GLSurfaceEGL : public GLSurface {
- public:
- GLSurfaceEGL();
- virtual ~GLSurfaceEGL();
-
- // Implement GLSurface.
- virtual EGLDisplay GetDisplay() OVERRIDE;
- virtual EGLConfig GetConfig() OVERRIDE;
-
- static bool InitializeOneOff();
- static EGLDisplay GetHardwareDisplay();
- static EGLDisplay GetSoftwareDisplay();
- static EGLNativeDisplayType GetNativeDisplay();
-
- protected:
- bool software_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL);
-};
-
-// Encapsulates an EGL surface bound to a view.
-class NativeViewGLSurfaceEGL : public GLSurfaceEGL {
- public:
- NativeViewGLSurfaceEGL(bool software, gfx::AcceleratedWidget window);
- virtual ~NativeViewGLSurfaceEGL();
-
- // Implement GLSurface.
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual EGLSurface GetHandle() OVERRIDE;
- virtual std::string GetExtensions() OVERRIDE;
- virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
-
- protected:
- void SetHandle(EGLSurface surface);
-
- private:
- gfx::AcceleratedWidget window_;
- EGLSurface surface_;
- bool supports_post_sub_buffer_;
-
- DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL);
-};
-
-// Encapsulates a pbuffer EGL surface.
-class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL {
- public:
- PbufferGLSurfaceEGL(bool software, const gfx::Size& size);
- virtual ~PbufferGLSurfaceEGL();
-
- // Implement GLSurface.
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual bool Resize(const gfx::Size& size) OVERRIDE;
- virtual EGLSurface GetHandle() OVERRIDE;
- virtual void* GetShareHandle() OVERRIDE;
-
- private:
- gfx::Size size_;
- EGLSurface surface_;
-
- DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL);
-};
-
-} // namespace gfx
-
-#endif // UI_GFX_GL_GL_SURFACE_EGL_H_
« no previous file with comments | « ui/gfx/gl/gl_surface_cgl.cc ('k') | ui/gfx/gl/gl_surface_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698