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

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

Issue 20017005: gpu: Refactor GpuMemoryBuffer framework for multi-process support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
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 <map> 10 #include <map>
11 #include <queue> 11 #include <queue>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "gles2_impl_export.h" 17 #include "gles2_impl_export.h"
18 #include "gpu/command_buffer/client/buffer_tracker.h" 18 #include "gpu/command_buffer/client/buffer_tracker.h"
19 #include "gpu/command_buffer/client/client_context_state.h" 19 #include "gpu/command_buffer/client/client_context_state.h"
20 #include "gpu/command_buffer/client/gles2_cmd_helper.h" 20 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
21 #include "gpu/command_buffer/client/gles2_interface.h" 21 #include "gpu/command_buffer/client/gles2_interface.h"
22 #include "gpu/command_buffer/client/gpu_memory_buffer_tracker.h" 22 #include "gpu/command_buffer/client/gpu_memory_buffer_tracker.h"
23 #include "gpu/command_buffer/client/image_factory.h"
24 #include "gpu/command_buffer/client/query_tracker.h" 23 #include "gpu/command_buffer/client/query_tracker.h"
25 #include "gpu/command_buffer/client/ref_counted.h" 24 #include "gpu/command_buffer/client/ref_counted.h"
26 #include "gpu/command_buffer/client/ring_buffer.h" 25 #include "gpu/command_buffer/client/ring_buffer.h"
27 #include "gpu/command_buffer/client/share_group.h" 26 #include "gpu/command_buffer/client/share_group.h"
28 #include "gpu/command_buffer/common/compiler_specific.h" 27 #include "gpu/command_buffer/common/compiler_specific.h"
29 #include "gpu/command_buffer/common/debug_marker_manager.h" 28 #include "gpu/command_buffer/common/debug_marker_manager.h"
30 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 29 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
31 30
32 #if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANC E_TESTS) // NOLINT 31 #if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANC E_TESTS) // NOLINT
33 #if defined(GLES2_INLINE_OPTIMIZATION) 32 #if defined(GLES2_INLINE_OPTIMIZATION)
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 static const GLuint kClientSideElementArrayId = 0xFEDCBA99u; 169 static const GLuint kClientSideElementArrayId = 0xFEDCBA99u;
171 170
172 // Number of swap buffers allowed before waiting. 171 // Number of swap buffers allowed before waiting.
173 static const size_t kMaxSwapBuffers = 2; 172 static const size_t kMaxSwapBuffers = 2;
174 173
175 GLES2Implementation( 174 GLES2Implementation(
176 GLES2CmdHelper* helper, 175 GLES2CmdHelper* helper,
177 ShareGroup* share_group, 176 ShareGroup* share_group,
178 TransferBufferInterface* transfer_buffer, 177 TransferBufferInterface* transfer_buffer,
179 bool share_resources, 178 bool share_resources,
180 bool bind_generates_resource, 179 bool bind_generates_resource);
181 ImageFactory* image_factory);
182 180
183 virtual ~GLES2Implementation(); 181 virtual ~GLES2Implementation();
184 182
185 bool Initialize( 183 bool Initialize(
186 unsigned int starting_transfer_buffer_size, 184 unsigned int starting_transfer_buffer_size,
187 unsigned int min_transfer_buffer_size, 185 unsigned int min_transfer_buffer_size,
188 unsigned int max_transfer_buffer_size); 186 unsigned int max_transfer_buffer_size);
189 187
190 // The GLES2CmdHelper being used by this GLES2Implementation. You can use 188 // The GLES2CmdHelper being used by this GLES2Implementation. You can use
191 // this to issue cmds at a lower level for certain kinds of optimization. 189 // this to issue cmds at a lower level for certain kinds of optimization.
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 QueryTracker::Query* current_query_; 660 QueryTracker::Query* current_query_;
663 661
664 scoped_ptr<BufferTracker> buffer_tracker_; 662 scoped_ptr<BufferTracker> buffer_tracker_;
665 663
666 scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_; 664 scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_;
667 665
668 ErrorMessageCallback* error_message_callback_; 666 ErrorMessageCallback* error_message_callback_;
669 667
670 scoped_ptr<std::string> current_trace_name_; 668 scoped_ptr<std::string> current_trace_name_;
671 669
672 ImageFactory* image_factory_;
673
674 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); 670 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation);
675 }; 671 };
676 672
677 inline bool GLES2Implementation::GetBufferParameterivHelper( 673 inline bool GLES2Implementation::GetBufferParameterivHelper(
678 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 674 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
679 return false; 675 return false;
680 } 676 }
681 677
682 inline bool GLES2Implementation::GetFramebufferAttachmentParameterivHelper( 678 inline bool GLES2Implementation::GetFramebufferAttachmentParameterivHelper(
683 GLenum /* target */, 679 GLenum /* target */,
(...skipping 20 matching lines...) Expand all
704 700
705 inline bool GLES2Implementation::GetTexParameterivHelper( 701 inline bool GLES2Implementation::GetTexParameterivHelper(
706 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 702 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
707 return false; 703 return false;
708 } 704 }
709 705
710 } // namespace gles2 706 } // namespace gles2
711 } // namespace gpu 707 } // namespace gpu
712 708
713 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ 709 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698