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

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

Issue 619453002: gpu: Remove Echo and SwapCompletion GL interfacess (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tits
Patch Set: rebase Created 6 years, 2 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 <GLES2/gl2.h> 8 #include <GLES2/gl2.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 #include "gpu/command_buffer/client/gles2_implementation_autogen.h" 213 #include "gpu/command_buffer/client/gles2_implementation_autogen.h"
214 214
215 virtual void DisableVertexAttribArray(GLuint index) OVERRIDE; 215 virtual void DisableVertexAttribArray(GLuint index) OVERRIDE;
216 virtual void EnableVertexAttribArray(GLuint index) OVERRIDE; 216 virtual void EnableVertexAttribArray(GLuint index) OVERRIDE;
217 virtual void GetVertexAttribfv( 217 virtual void GetVertexAttribfv(
218 GLuint index, GLenum pname, GLfloat* params) OVERRIDE; 218 GLuint index, GLenum pname, GLfloat* params) OVERRIDE;
219 virtual void GetVertexAttribiv( 219 virtual void GetVertexAttribiv(
220 GLuint index, GLenum pname, GLint* params) OVERRIDE; 220 GLuint index, GLenum pname, GLint* params) OVERRIDE;
221 221
222 // ContextSupport implementation. 222 // ContextSupport implementation.
223 virtual void Swap() OVERRIDE;
224 virtual void PartialSwapBuffers(const gfx::Rect& sub_buffer) OVERRIDE;
225 virtual void SetSwapBuffersCompleteCallback(
226 const base::Closure& swap_buffers_complete_callback)
227 OVERRIDE;
228 virtual void ScheduleOverlayPlane(int plane_z_order, 223 virtual void ScheduleOverlayPlane(int plane_z_order,
229 gfx::OverlayTransform plane_transform, 224 gfx::OverlayTransform plane_transform,
230 unsigned overlay_texture_id, 225 unsigned overlay_texture_id,
231 const gfx::Rect& display_bounds, 226 const gfx::Rect& display_bounds,
232 const gfx::RectF& uv_rect) OVERRIDE; 227 const gfx::RectF& uv_rect) OVERRIDE;
233 virtual GLuint InsertFutureSyncPointCHROMIUM() OVERRIDE; 228 virtual GLuint InsertFutureSyncPointCHROMIUM() OVERRIDE;
234 virtual void RetireSyncPointCHROMIUM(GLuint sync_point) OVERRIDE; 229 virtual void RetireSyncPointCHROMIUM(GLuint sync_point) OVERRIDE;
235 230
236 void GetProgramInfoCHROMIUMHelper(GLuint program, std::vector<int8>* result); 231 void GetProgramInfoCHROMIUMHelper(GLuint program, std::vector<int8>* result);
237 GLint GetAttribLocationHelper(GLuint program, const char* name); 232 GLint GetAttribLocationHelper(GLuint program, const char* name);
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 IdHandlerInterface* GetIdHandler(int id_namespace) const; 592 IdHandlerInterface* GetIdHandler(int id_namespace) const;
598 // IdAllocators for objects that can't be shared among contexts. 593 // IdAllocators for objects that can't be shared among contexts.
599 // For now, used only for Queries. TODO(hj.r.chung) Should be added for 594 // For now, used only for Queries. TODO(hj.r.chung) Should be added for
600 // Framebuffer and Vertex array objects. 595 // Framebuffer and Vertex array objects.
601 IdAllocatorInterface* GetIdAllocator(int id_namespace) const; 596 IdAllocatorInterface* GetIdAllocator(int id_namespace) const;
602 597
603 void FinishHelper(); 598 void FinishHelper();
604 599
605 void RunIfContextNotLost(const base::Closure& callback); 600 void RunIfContextNotLost(const base::Closure& callback);
606 601
607 void OnSwapBuffersComplete();
608
609 // Validate if an offset is valid, i.e., non-negative and fit into 32-bit. 602 // Validate if an offset is valid, i.e., non-negative and fit into 32-bit.
610 // If not, generate an approriate error, and return false. 603 // If not, generate an approriate error, and return false.
611 bool ValidateOffset(const char* func, GLintptr offset); 604 bool ValidateOffset(const char* func, GLintptr offset);
612 605
613 // Validate if a size is valid, i.e., non-negative and fit into 32-bit. 606 // Validate if a size is valid, i.e., non-negative and fit into 32-bit.
614 // If not, generate an approriate error, and return false. 607 // If not, generate an approriate error, and return false.
615 bool ValidateSize(const char* func, GLsizeiptr offset); 608 bool ValidateSize(const char* func, GLsizeiptr offset);
616 609
617 // Remove the transfer buffer from the buffer tracker. For buffers used 610 // Remove the transfer buffer from the buffer tracker. For buffers used
618 // asynchronously the memory is free:ed if the upload has completed. For 611 // asynchronously the memory is free:ed if the upload has completed. For
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_; 771 scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_;
779 772
780 GLES2ImplementationErrorMessageCallback* error_message_callback_; 773 GLES2ImplementationErrorMessageCallback* error_message_callback_;
781 774
782 scoped_ptr<std::string> current_trace_name_; 775 scoped_ptr<std::string> current_trace_name_;
783 776
784 GpuControl* gpu_control_; 777 GpuControl* gpu_control_;
785 778
786 Capabilities capabilities_; 779 Capabilities capabilities_;
787 780
788 base::Closure swap_buffers_complete_callback_;
789
790 base::WeakPtrFactory<GLES2Implementation> weak_ptr_factory_; 781 base::WeakPtrFactory<GLES2Implementation> weak_ptr_factory_;
791 782
792 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); 783 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation);
793 }; 784 };
794 785
795 inline bool GLES2Implementation::GetBufferParameterivHelper( 786 inline bool GLES2Implementation::GetBufferParameterivHelper(
796 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 787 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
797 return false; 788 return false;
798 } 789 }
799 790
(...skipping 22 matching lines...) Expand all
822 813
823 inline bool GLES2Implementation::GetTexParameterivHelper( 814 inline bool GLES2Implementation::GetTexParameterivHelper(
824 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 815 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
825 return false; 816 return false;
826 } 817 }
827 818
828 } // namespace gles2 819 } // namespace gles2
829 } // namespace gpu 820 } // namespace gpu
830 821
831 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ 822 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698