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

Side by Side Diff: gpu/gles2_conform_support/egl/surface.h

Issue 1714883002: command_buffer_gles2: Implement EGL default Display as a global object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@command_buffer_gles2-multiple-contexts
Patch Set: Created 4 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 GPU_GLES2_CONFORM_TEST_SURFACE_H_ 5 #ifndef GPU_GLES2_CONFORM_TEST_SURFACE_H_
6 #define GPU_GLES2_CONFORM_TEST_SURFACE_H_ 6 #define GPU_GLES2_CONFORM_TEST_SURFACE_H_
7 7
8 #include <EGL/egl.h> 8 #include <EGL/egl.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 11 #include "base/memory/ref_counted.h"
12 namespace gfx {
13 class GLSurface;
14 }
12 namespace egl { 15 namespace egl {
13 16
14 class Surface { 17 class Surface : public base::RefCountedThreadSafe<Surface> {
15 public: 18 public:
16 explicit Surface(EGLNativeWindowType win); 19 explicit Surface(gfx::GLSurface* gl_surface);
17 ~Surface(); 20 void set_is_current_in_some_thread(bool flag) {
18 21 is_current_in_some_thread_ = flag;
19 EGLNativeWindowType window() { return window_; } 22 }
23 bool is_current_in_some_thread() const { return is_current_in_some_thread_; }
24 gfx::GLSurface* gl_surface() const;
25 static bool ValidatePbufferAttributeList(const EGLint* attrib_list);
26 static bool ValidateWindowAttributeList(const EGLint* attrib_list);
20 27
21 private: 28 private:
22 EGLNativeWindowType window_; 29 friend class base::RefCountedThreadSafe<Surface>;
23 30 ~Surface();
31 bool is_current_in_some_thread_;
32 scoped_refptr<gfx::GLSurface> gl_surface_;
24 DISALLOW_COPY_AND_ASSIGN(Surface); 33 DISALLOW_COPY_AND_ASSIGN(Surface);
25 }; 34 };
26 35
27 } // namespace egl 36 } // namespace egl
28 37
29 #endif // GPU_GLES2_CONFORM_TEST_SURFACE_H_ 38 #endif // GPU_GLES2_CONFORM_TEST_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698