| 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_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 void PartialSwapBuffers(const gfx::Rect& sub_buffer) override; | 199 void PartialSwapBuffers(const gfx::Rect& sub_buffer) override; |
| 200 void CommitOverlayPlanes() override; | 200 void CommitOverlayPlanes() override; |
| 201 void ScheduleOverlayPlane(int plane_z_order, | 201 void ScheduleOverlayPlane(int plane_z_order, |
| 202 gfx::OverlayTransform plane_transform, | 202 gfx::OverlayTransform plane_transform, |
| 203 unsigned overlay_texture_id, | 203 unsigned overlay_texture_id, |
| 204 const gfx::Rect& display_bounds, | 204 const gfx::Rect& display_bounds, |
| 205 const gfx::RectF& uv_rect) override; | 205 const gfx::RectF& uv_rect) override; |
| 206 uint64_t ShareGroupTracingGUID() const override; | 206 uint64_t ShareGroupTracingGUID() const override; |
| 207 void SetErrorMessageCallback( | 207 void SetErrorMessageCallback( |
| 208 const base::Callback<void(const char*, int32_t)>& callback) override; | 208 const base::Callback<void(const char*, int32_t)>& callback) override; |
| 209 void SetClientVisible(int client_id, bool is_visible) override; | 209 std::unique_ptr<ScopedVisibility> ClientBecameVisible() override; |
| 210 void ClientBecameNotVisible( |
| 211 std::unique_ptr<ScopedVisibility> visibility) override; |
| 210 bool AnyClientsVisible() const override; | 212 bool AnyClientsVisible() const override; |
| 211 | 213 |
| 212 // TODO(danakj): Move to ContextSupport once ContextProvider doesn't need to | 214 // TODO(danakj): Move to ContextSupport once ContextProvider doesn't need to |
| 213 // intercept it. | 215 // intercept it. |
| 214 void SetLostContextCallback(const base::Closure& callback); | 216 void SetLostContextCallback(const base::Closure& callback); |
| 215 | 217 |
| 216 void GetProgramInfoCHROMIUMHelper(GLuint program, | 218 void GetProgramInfoCHROMIUMHelper(GLuint program, |
| 217 std::vector<int8_t>* result); | 219 std::vector<int8_t>* result); |
| 218 GLint GetAttribLocationHelper(GLuint program, const char* name); | 220 GLint GetAttribLocationHelper(GLuint program, const char* name); |
| 219 GLint GetUniformLocationHelper(GLuint program, const char* name); | 221 GLint GetUniformLocationHelper(GLuint program, const char* name); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 bool GetQueryObjectValueHelper( | 253 bool GetQueryObjectValueHelper( |
| 252 const char* function_name, GLuint id, GLenum pname, GLuint64* params); | 254 const char* function_name, GLuint id, GLenum pname, GLuint64* params); |
| 253 | 255 |
| 254 void FreeUnusedSharedMemory(); | 256 void FreeUnusedSharedMemory(); |
| 255 void FreeEverything(); | 257 void FreeEverything(); |
| 256 | 258 |
| 257 // ContextSupport implementation. | 259 // ContextSupport implementation. |
| 258 void SignalSyncToken(const gpu::SyncToken& sync_token, | 260 void SignalSyncToken(const gpu::SyncToken& sync_token, |
| 259 const base::Closure& callback) override; | 261 const base::Closure& callback) override; |
| 260 void SignalQuery(uint32_t query, const base::Closure& callback) override; | 262 void SignalQuery(uint32_t query, const base::Closure& callback) override; |
| 261 void SetAggressivelyFreeResources(bool aggressively_free_resources) override; | 263 void TrimResources() override; |
| 262 | 264 |
| 263 // base::trace_event::MemoryDumpProvider implementation. | 265 // base::trace_event::MemoryDumpProvider implementation. |
| 264 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, | 266 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| 265 base::trace_event::ProcessMemoryDump* pmd) override; | 267 base::trace_event::ProcessMemoryDump* pmd) override; |
| 266 | 268 |
| 267 const scoped_refptr<ShareGroup>& share_group() const { return share_group_; } | 269 const scoped_refptr<ShareGroup>& share_group() const { return share_group_; } |
| 268 | 270 |
| 269 const Capabilities& capabilities() const { | 271 const Capabilities& capabilities() const { |
| 270 return capabilities_; | 272 return capabilities_; |
| 271 } | 273 } |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 bool lost_context_callback_run_ = false; | 823 bool lost_context_callback_run_ = false; |
| 822 | 824 |
| 823 int current_trace_stack_; | 825 int current_trace_stack_; |
| 824 | 826 |
| 825 GpuControl* gpu_control_; | 827 GpuControl* gpu_control_; |
| 826 | 828 |
| 827 Capabilities capabilities_; | 829 Capabilities capabilities_; |
| 828 | 830 |
| 829 // Flag to indicate whether the implementation can retain resources, or | 831 // Flag to indicate whether the implementation can retain resources, or |
| 830 // whether it should aggressively free them. | 832 // whether it should aggressively free them. |
| 831 bool aggressively_free_resources_; | 833 bool aggressively_free_resources_ = false; |
| 832 | 834 |
| 833 // The set of IDs of all visible clients. | 835 uint32_t num_visible_clients_ = 0; |
| 834 std::set<int> visible_clients_; | |
| 835 | 836 |
| 836 // Result of last GetString(GL_EXTENSIONS), used to keep | 837 // Result of last GetString(GL_EXTENSIONS), used to keep |
| 837 // GetString(GL_EXTENSIONS), GetStringi(GL_EXTENSIONS, index) and | 838 // GetString(GL_EXTENSIONS), GetStringi(GL_EXTENSIONS, index) and |
| 838 // GetIntegerv(GL_NUM_EXTENSIONS) in sync. This points to gl_strings, valid | 839 // GetIntegerv(GL_NUM_EXTENSIONS) in sync. This points to gl_strings, valid |
| 839 // forever. | 840 // forever. |
| 840 const char* cached_extension_string_; | 841 const char* cached_extension_string_; |
| 841 | 842 |
| 842 // Populated if cached_extension_string_ != nullptr. These point to | 843 // Populated if cached_extension_string_ != nullptr. These point to |
| 843 // gl_strings, valid forever. | 844 // gl_strings, valid forever. |
| 844 std::vector<const char*> cached_extensions_; | 845 std::vector<const char*> cached_extensions_; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 | 884 |
| 884 inline bool GLES2Implementation::GetTexParameterivHelper( | 885 inline bool GLES2Implementation::GetTexParameterivHelper( |
| 885 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 886 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
| 886 return false; | 887 return false; |
| 887 } | 888 } |
| 888 | 889 |
| 889 } // namespace gles2 | 890 } // namespace gles2 |
| 890 } // namespace gpu | 891 } // namespace gpu |
| 891 | 892 |
| 892 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 893 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| OLD | NEW |