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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.h

Issue 2252163003: Update Context Client Visibility to use Scoped Pattern (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 4 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 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
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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_;
832 834
833 // The set of IDs of all visible clients. 835 // The number of visible clients.
834 std::set<int> visible_clients_; 836 uint32_t visible_clients_;
danakj 2016/08/18 21:39:44 num_visible_clients_?
ericrk 2016/08/19 17:23:19 Done.
835 837
836 // Result of last GetString(GL_EXTENSIONS), used to keep 838 // Result of last GetString(GL_EXTENSIONS), used to keep
837 // GetString(GL_EXTENSIONS), GetStringi(GL_EXTENSIONS, index) and 839 // GetString(GL_EXTENSIONS), GetStringi(GL_EXTENSIONS, index) and
838 // GetIntegerv(GL_NUM_EXTENSIONS) in sync. This points to gl_strings, valid 840 // GetIntegerv(GL_NUM_EXTENSIONS) in sync. This points to gl_strings, valid
839 // forever. 841 // forever.
840 const char* cached_extension_string_; 842 const char* cached_extension_string_;
841 843
842 // Populated if cached_extension_string_ != nullptr. These point to 844 // Populated if cached_extension_string_ != nullptr. These point to
843 // gl_strings, valid forever. 845 // gl_strings, valid forever.
844 std::vector<const char*> cached_extensions_; 846 std::vector<const char*> cached_extensions_;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 885
884 inline bool GLES2Implementation::GetTexParameterivHelper( 886 inline bool GLES2Implementation::GetTexParameterivHelper(
885 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 887 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
886 return false; 888 return false;
887 } 889 }
888 890
889 } // namespace gles2 891 } // namespace gles2
890 } // namespace gpu 892 } // namespace gpu
891 893
892 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ 894 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698