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

Side by Side Diff: ui/gl/gl_surface_egl.h

Issue 13140006: gpu: Fix Vivante's "hisilicon" GPUs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add FBO restore Created 7 years, 8 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 unified diff | Download patch
« no previous file with comments | « ui/gl/gl_surface.cc ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_GL_GL_SURFACE_EGL_H_ 5 #ifndef UI_GL_GL_SURFACE_EGL_H_
6 #define UI_GL_GL_SURFACE_EGL_H_ 6 #define UI_GL_GL_SURFACE_EGL_H_
7 7
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // Encapsulates an EGL surface bound to a view. 53 // Encapsulates an EGL surface bound to a view.
54 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { 54 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL {
55 public: 55 public:
56 NativeViewGLSurfaceEGL(bool software, gfx::AcceleratedWidget window); 56 NativeViewGLSurfaceEGL(bool software, gfx::AcceleratedWidget window);
57 57
58 // Implement GLSurface. 58 // Implement GLSurface.
59 virtual EGLConfig GetConfig() OVERRIDE; 59 virtual EGLConfig GetConfig() OVERRIDE;
60 virtual bool Initialize() OVERRIDE; 60 virtual bool Initialize() OVERRIDE;
61 virtual void Destroy() OVERRIDE; 61 virtual void Destroy() OVERRIDE;
62 virtual bool Resize(const gfx::Size& size) OVERRIDE; 62 virtual bool Resize(const gfx::Size& size) OVERRIDE;
63 virtual bool Recreate() OVERRIDE;
63 virtual bool IsOffscreen() OVERRIDE; 64 virtual bool IsOffscreen() OVERRIDE;
64 virtual bool SwapBuffers() OVERRIDE; 65 virtual bool SwapBuffers() OVERRIDE;
65 virtual gfx::Size GetSize() OVERRIDE; 66 virtual gfx::Size GetSize() OVERRIDE;
66 virtual EGLSurface GetHandle() OVERRIDE; 67 virtual EGLSurface GetHandle() OVERRIDE;
67 virtual std::string GetExtensions() OVERRIDE; 68 virtual std::string GetExtensions() OVERRIDE;
68 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; 69 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
69 virtual VSyncProvider* GetVSyncProvider() OVERRIDE; 70 virtual VSyncProvider* GetVSyncProvider() OVERRIDE;
71 virtual bool RecreateOnMakeCurrent() OVERRIDE;
72 virtual void SetRecreateOnMakeCurrent(bool recreate) OVERRIDE;
70 73
71 protected: 74 protected:
72 virtual ~NativeViewGLSurfaceEGL(); 75 virtual ~NativeViewGLSurfaceEGL();
73 void SetHandle(EGLSurface surface); 76 void SetHandle(EGLSurface surface);
74 77
75 private: 78 private:
76 gfx::AcceleratedWidget window_; 79 gfx::AcceleratedWidget window_;
77 EGLSurface surface_; 80 EGLSurface surface_;
78 bool supports_post_sub_buffer_; 81 bool supports_post_sub_buffer_;
79 EGLConfig config_; 82 EGLConfig config_;
83 bool recreate_on_make_current_;
80 84
81 scoped_ptr<VSyncProvider> vsync_provider_; 85 scoped_ptr<VSyncProvider> vsync_provider_;
82 86
83 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL); 87 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL);
84 }; 88 };
85 89
86 // Encapsulates a pbuffer EGL surface. 90 // Encapsulates a pbuffer EGL surface.
87 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { 91 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL {
88 public: 92 public:
89 PbufferGLSurfaceEGL(bool software, const gfx::Size& size); 93 PbufferGLSurfaceEGL(bool software, const gfx::Size& size);
(...skipping 15 matching lines...) Expand all
105 private: 109 private:
106 gfx::Size size_; 110 gfx::Size size_;
107 EGLSurface surface_; 111 EGLSurface surface_;
108 112
109 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); 113 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL);
110 }; 114 };
111 115
112 } // namespace gfx 116 } // namespace gfx
113 117
114 #endif // UI_GL_GL_SURFACE_EGL_H_ 118 #endif // UI_GL_GL_SURFACE_EGL_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_surface.cc ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698