| OLD | NEW |
| 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 GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 5 #ifndef GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
| 6 #define GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 6 #define GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
| 7 | 7 |
| 8 #include <EGL/egl.h> | 8 #include <EGL/egl.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| 11 | 11 |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
| 18 #include "gpu/config/gpu_driver_bug_workarounds.h" | |
| 19 | 18 |
| 20 namespace egl { | 19 namespace egl { |
| 21 | 20 |
| 22 class Config; | 21 class Config; |
| 23 class Context; | 22 class Context; |
| 24 class Surface; | 23 class Surface; |
| 25 class ThreadState; | 24 class ThreadState; |
| 26 | 25 |
| 27 class Display { | 26 class Display { |
| 28 public: | 27 public: |
| 29 explicit Display(); | 28 explicit Display(); |
| 30 ~Display(); | 29 ~Display(); |
| 31 | 30 |
| 32 bool is_initialized() const { return is_initialized_; } | 31 bool is_initialized() const { return is_initialized_; } |
| 33 | 32 |
| 34 void ReleaseCurrentForReleaseThread(ThreadState*); | 33 void ReleaseCurrentForReleaseThread(ThreadState*); |
| 35 | 34 |
| 36 // A function for windowless GTF tests. | 35 // A function for windowless GTF tests. |
| 37 void SetNextCreateWindowSurfaceCreatesPBuffer(EGLint width, EGLint height); | 36 void SetNextCreateWindowSurfaceCreatesPBuffer(EGLint width, EGLint height); |
| 38 | 37 |
| 39 const gpu::GpuDriverBugWorkarounds& gpu_driver_bug_workarounds() const { | |
| 40 return gpu_driver_bug_workarounds_; | |
| 41 } | |
| 42 | |
| 43 EGLBoolean Initialize(ThreadState* ts, EGLint* major, EGLint* minor); | 38 EGLBoolean Initialize(ThreadState* ts, EGLint* major, EGLint* minor); |
| 44 EGLBoolean Terminate(ThreadState* ts); | 39 EGLBoolean Terminate(ThreadState* ts); |
| 45 const char* QueryString(ThreadState* ts, EGLint name); | 40 const char* QueryString(ThreadState* ts, EGLint name); |
| 46 | 41 |
| 47 // Config routines. | 42 // Config routines. |
| 48 EGLBoolean GetConfigAttrib(ThreadState* ts, | 43 EGLBoolean GetConfigAttrib(ThreadState* ts, |
| 49 EGLConfig cfg, | 44 EGLConfig cfg, |
| 50 EGLint attribute, | 45 EGLint attribute, |
| 51 EGLint* value); | 46 EGLint* value); |
| 52 EGLBoolean ChooseConfig(ThreadState* ts, | 47 EGLBoolean ChooseConfig(ThreadState* ts, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 uint64_t next_fence_sync_release_; | 95 uint64_t next_fence_sync_release_; |
| 101 std::vector<scoped_refptr<Surface>> surfaces_; | 96 std::vector<scoped_refptr<Surface>> surfaces_; |
| 102 std::vector<scoped_refptr<Context>> contexts_; | 97 std::vector<scoped_refptr<Context>> contexts_; |
| 103 scoped_ptr<Config> configs_[2]; | 98 scoped_ptr<Config> configs_[2]; |
| 104 | 99 |
| 105 // GTF windowless support. | 100 // GTF windowless support. |
| 106 bool next_create_window_surface_creates_pbuffer_; | 101 bool next_create_window_surface_creates_pbuffer_; |
| 107 EGLint window_surface_pbuffer_width_; | 102 EGLint window_surface_pbuffer_width_; |
| 108 EGLint window_surface_pbuffer_height_; | 103 EGLint window_surface_pbuffer_height_; |
| 109 | 104 |
| 110 const gpu::GpuDriverBugWorkarounds gpu_driver_bug_workarounds_; | |
| 111 | |
| 112 DISALLOW_COPY_AND_ASSIGN(Display); | 105 DISALLOW_COPY_AND_ASSIGN(Display); |
| 113 }; | 106 }; |
| 114 | 107 |
| 115 } // namespace egl | 108 } // namespace egl |
| 116 | 109 |
| 117 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ | 110 #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_DISPLAY_H_ |
| OLD | NEW |