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

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

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: mac build fix 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 #include <GLES2/gl2extchromium.h>
9 10
10 #include <list> 11 #include <list>
11 #include <map> 12 #include <map>
12 #include <queue> 13 #include <queue>
13 #include <set> 14 #include <set>
14 #include <string> 15 #include <string>
15 #include <utility> 16 #include <utility>
16 #include <vector> 17 #include <vector>
17 18
18 #include "base/compiler_specific.h" 19 #include "base/compiler_specific.h"
19 #include "base/memory/scoped_ptr.h" 20 #include "base/memory/scoped_ptr.h"
20 #include "base/memory/weak_ptr.h" 21 #include "base/memory/weak_ptr.h"
21 #include "gpu/command_buffer/client/buffer_tracker.h" 22 #include "gpu/command_buffer/client/buffer_tracker.h"
22 #include "gpu/command_buffer/client/client_context_state.h" 23 #include "gpu/command_buffer/client/client_context_state.h"
23 #include "gpu/command_buffer/client/context_support.h" 24 #include "gpu/command_buffer/client/context_support.h"
24 #include "gpu/command_buffer/client/gles2_cmd_helper.h" 25 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
25 #include "gpu/command_buffer/client/gles2_impl_export.h" 26 #include "gpu/command_buffer/client/gles2_impl_export.h"
26 #include "gpu/command_buffer/client/gles2_interface.h" 27 #include "gpu/command_buffer/client/gles2_interface.h"
27 #include "gpu/command_buffer/client/gpu_memory_buffer_tracker.h"
28 #include "gpu/command_buffer/client/mapped_memory.h" 28 #include "gpu/command_buffer/client/mapped_memory.h"
29 #include "gpu/command_buffer/client/query_tracker.h" 29 #include "gpu/command_buffer/client/query_tracker.h"
30 #include "gpu/command_buffer/client/ref_counted.h" 30 #include "gpu/command_buffer/client/ref_counted.h"
31 #include "gpu/command_buffer/client/ring_buffer.h" 31 #include "gpu/command_buffer/client/ring_buffer.h"
32 #include "gpu/command_buffer/client/share_group.h" 32 #include "gpu/command_buffer/client/share_group.h"
33 #include "gpu/command_buffer/common/capabilities.h" 33 #include "gpu/command_buffer/common/capabilities.h"
34 #include "gpu/command_buffer/common/debug_marker_manager.h" 34 #include "gpu/command_buffer/common/debug_marker_manager.h"
35 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 35 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
36 #include "gpu/command_buffer/common/id_allocator.h" 36 #include "gpu/command_buffer/common/id_allocator.h"
37 37
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 void DeleteVertexArraysOESStub(GLsizei n, const GLuint* arrays); 536 void DeleteVertexArraysOESStub(GLsizei n, const GLuint* arrays);
537 537
538 void BufferDataHelper( 538 void BufferDataHelper(
539 GLenum target, GLsizeiptr size, const void* data, GLenum usage); 539 GLenum target, GLsizeiptr size, const void* data, GLenum usage);
540 void BufferSubDataHelper( 540 void BufferSubDataHelper(
541 GLenum target, GLintptr offset, GLsizeiptr size, const void* data); 541 GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
542 void BufferSubDataHelperImpl( 542 void BufferSubDataHelperImpl(
543 GLenum target, GLintptr offset, GLsizeiptr size, const void* data, 543 GLenum target, GLintptr offset, GLsizeiptr size, const void* data,
544 ScopedTransferBufferPtr* buffer); 544 ScopedTransferBufferPtr* buffer);
545 545
546 GLuint CreateImageCHROMIUMHelper(GLsizei width, 546 GLuint CreateImageCHROMIUMHelper(ClientBuffer buffer,
547 GLsizei width,
547 GLsizei height, 548 GLsizei height,
548 GLenum internalformat, 549 GLenum internalformat);
549 GLenum usage);
550 void DestroyImageCHROMIUMHelper(GLuint image_id); 550 void DestroyImageCHROMIUMHelper(GLuint image_id);
551 void* MapImageCHROMIUMHelper(GLuint image_id);
552 void UnmapImageCHROMIUMHelper(GLuint image_id);
553 void GetImageParameterivCHROMIUMHelper(
554 GLuint image_id, GLenum pname, GLint* params);
555 GLuint CreateGpuMemoryBufferImageCHROMIUMHelper(GLsizei width, 551 GLuint CreateGpuMemoryBufferImageCHROMIUMHelper(GLsizei width,
556 GLsizei height, 552 GLsizei height,
557 GLenum internalformat, 553 GLenum internalformat,
558 GLenum usage); 554 GLenum usage);
559 555
560 // Helper for GetVertexAttrib 556 // Helper for GetVertexAttrib
561 bool GetVertexAttribHelper(GLuint index, GLenum pname, uint32* param); 557 bool GetVertexAttribHelper(GLuint index, GLenum pname, uint32* param);
562 558
563 GLuint GetMaxValueInBufferCHROMIUMHelper( 559 GLuint GetMaxValueInBufferCHROMIUMHelper(
564 GLuint buffer_id, GLsizei count, GLenum type, GLuint offset); 560 GLuint buffer_id, GLsizei count, GLenum type, GLuint offset);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 scoped_refptr<ShareGroup> share_group_; 763 scoped_refptr<ShareGroup> share_group_;
768 ShareGroupContextData share_group_context_data_; 764 ShareGroupContextData share_group_context_data_;
769 765
770 scoped_ptr<QueryTracker> query_tracker_; 766 scoped_ptr<QueryTracker> query_tracker_;
771 typedef std::map<GLuint, QueryTracker::Query*> QueryMap; 767 typedef std::map<GLuint, QueryTracker::Query*> QueryMap;
772 QueryMap current_queries_; 768 QueryMap current_queries_;
773 scoped_ptr<IdAllocator> query_id_allocator_; 769 scoped_ptr<IdAllocator> query_id_allocator_;
774 770
775 scoped_ptr<BufferTracker> buffer_tracker_; 771 scoped_ptr<BufferTracker> buffer_tracker_;
776 772
777 scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_;
778
779 GLES2ImplementationErrorMessageCallback* error_message_callback_; 773 GLES2ImplementationErrorMessageCallback* error_message_callback_;
780 774
781 scoped_ptr<std::string> current_trace_name_; 775 scoped_ptr<std::string> current_trace_name_;
782 776
783 GpuControl* gpu_control_; 777 GpuControl* gpu_control_;
784 778
785 Capabilities capabilities_; 779 Capabilities capabilities_;
786 780
787 base::WeakPtrFactory<GLES2Implementation> weak_ptr_factory_; 781 base::WeakPtrFactory<GLES2Implementation> weak_ptr_factory_;
788 782
(...skipping 30 matching lines...) Expand all
819 813
820 inline bool GLES2Implementation::GetTexParameterivHelper( 814 inline bool GLES2Implementation::GetTexParameterivHelper(
821 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 815 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
822 return false; 816 return false;
823 } 817 }
824 818
825 } // namespace gles2 819 } // namespace gles2
826 } // namespace gpu 820 } // namespace gpu
827 821
828 #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