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

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

Issue 1538803004: Create child window in GPU process for DirectComposition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 static EGLDisplay InitializeDisplay(); 56 static EGLDisplay InitializeDisplay();
57 static EGLNativeDisplayType GetNativeDisplay(); 57 static EGLNativeDisplayType GetNativeDisplay();
58 58
59 // These aren't particularly tied to surfaces, but since we already 59 // These aren't particularly tied to surfaces, but since we already
60 // have the static InitializeOneOff here, it's easiest to reuse its 60 // have the static InitializeOneOff here, it's easiest to reuse its
61 // initialization guards. 61 // initialization guards.
62 static const char* GetEGLExtensions(); 62 static const char* GetEGLExtensions();
63 static bool HasEGLExtension(const char* name); 63 static bool HasEGLExtension(const char* name);
64 static bool IsCreateContextRobustnessSupported(); 64 static bool IsCreateContextRobustnessSupported();
65 static bool IsEGLSurfacelessContextSupported(); 65 static bool IsEGLSurfacelessContextSupported();
66 static bool IsDirectCompositionSupported();
66 67
67 protected: 68 protected:
68 ~GLSurfaceEGL() override; 69 ~GLSurfaceEGL() override;
69 70
70 private: 71 private:
71 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); 72 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL);
72 }; 73 };
73 74
74 // Encapsulates an EGL surface bound to a view. 75 // Encapsulates an EGL surface bound to a view.
75 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { 76 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL {
(...skipping 29 matching lines...) Expand all
105 106
106 // Takes care of the platform dependant bits, of any, for creating the window. 107 // Takes care of the platform dependant bits, of any, for creating the window.
107 virtual bool InitializeNativeWindow(); 108 virtual bool InitializeNativeWindow();
108 109
109 protected: 110 protected:
110 ~NativeViewGLSurfaceEGL() override; 111 ~NativeViewGLSurfaceEGL() override;
111 112
112 EGLNativeWindowType window_; 113 EGLNativeWindowType window_;
113 EGLConfig config_; 114 EGLConfig config_;
114 gfx::Size size_; 115 gfx::Size size_;
116 bool alpha_;
117 bool enable_fixed_size_angle_;
115 118
116 void OnSetSwapInterval(int interval) override; 119 void OnSetSwapInterval(int interval) override;
117 120
118 private: 121 private:
119 // Commit the |pending_overlays_| and clear the vector. Returns false if any 122 // Commit the |pending_overlays_| and clear the vector. Returns false if any
120 // fail to be committed. 123 // fail to be committed.
121 bool CommitAndClearPendingOverlays(); 124 bool CommitAndClearPendingOverlays();
122 125
123 EGLSurface surface_; 126 EGLSurface surface_;
124 bool supports_post_sub_buffer_; 127 bool supports_post_sub_buffer_;
125 bool alpha_;
126 128
127 scoped_ptr<VSyncProvider> vsync_provider_; 129 scoped_ptr<VSyncProvider> vsync_provider_;
128 130
129 int swap_interval_; 131 int swap_interval_;
130 132
131 std::vector<GLSurfaceOverlay> pending_overlays_; 133 std::vector<GLSurfaceOverlay> pending_overlays_;
132 134
133 #if defined(OS_WIN) 135 #if defined(OS_WIN)
134 bool vsync_override_; 136 bool vsync_override_;
135 137
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 ~SurfacelessEGL() override; 197 ~SurfacelessEGL() override;
196 198
197 private: 199 private:
198 gfx::Size size_; 200 gfx::Size size_;
199 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); 201 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL);
200 }; 202 };
201 203
202 } // namespace gfx 204 } // namespace gfx
203 205
204 #endif // UI_GL_GL_SURFACE_EGL_H_ 206 #endif // UI_GL_GL_SURFACE_EGL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698