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

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

Issue 9581018: GPU: Build most of the gpu as a single DLL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 "../common/gles2_cmd_utils.h" 16 #include "../common/gles2_cmd_utils.h"
17 #include "../common/scoped_ptr.h" 17 #include "../common/scoped_ptr.h"
18 #include "../client/gles2_cmd_helper.h" 18 #include "../client/gles2_cmd_helper.h"
19 #include "../client/ring_buffer.h" 19 #include "../client/ring_buffer.h"
20 #include "gles2_impl_export.h"
20 21
21 #if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANC E_TESTS) // NOLINT 22 #if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANC E_TESTS) // NOLINT
22 #if defined(GLES2_INLINE_OPTIMIZATION) 23 #if defined(GLES2_INLINE_OPTIMIZATION)
23 // TODO(gman): Replace with macros that work with inline optmization. 24 // TODO(gman): Replace with macros that work with inline optmization.
24 #define GPU_CLIENT_SINGLE_THREAD_CHECK() 25 #define GPU_CLIENT_SINGLE_THREAD_CHECK()
25 #define GPU_CLIENT_LOG(args) 26 #define GPU_CLIENT_LOG(args)
26 #define GPU_CLIENT_LOG_CODE_BLOCK(code) 27 #define GPU_CLIENT_LOG_CODE_BLOCK(code)
27 #define GPU_CLIENT_DCHECK_CODE_BLOCK(code) 28 #define GPU_CLIENT_DCHECK_CODE_BLOCK(code)
28 #else 29 #else
29 #include "base/logging.h" 30 #include "base/logging.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Marks an id as used for glBind functions. id = 0 does nothing. 98 // Marks an id as used for glBind functions. id = 0 does nothing.
98 virtual bool MarkAsUsedForBind(GLuint id) = 0; 99 virtual bool MarkAsUsedForBind(GLuint id) = 0;
99 }; 100 };
100 101
101 // This class emulates GLES2 over command buffers. It can be used by a client 102 // This class emulates GLES2 over command buffers. It can be used by a client
102 // program so that the program does not need deal with shared memory and command 103 // program so that the program does not need deal with shared memory and command
103 // buffer management. See gl2_lib.h. Note that there is a performance gain to 104 // buffer management. See gl2_lib.h. Note that there is a performance gain to
104 // be had by changing your code to use command buffers directly by using the 105 // be had by changing your code to use command buffers directly by using the
105 // GLES2CmdHelper but that entails changing your code to use and deal with 106 // GLES2CmdHelper but that entails changing your code to use and deal with
106 // shared memory and synchronization issues. 107 // shared memory and synchronization issues.
107 class GLES2Implementation { 108 class GLES2_IMPL_EXPORT GLES2Implementation {
108 public: 109 public:
109 // Stores client side cached GL state. 110 // Stores client side cached GL state.
110 struct GLState { 111 struct GLState {
111 GLState() 112 GLState()
112 : max_combined_texture_image_units(0), 113 : max_combined_texture_image_units(0),
113 max_cube_map_texture_size(0), 114 max_cube_map_texture_size(0),
114 max_fragment_uniform_vectors(0), 115 max_fragment_uniform_vectors(0),
115 max_renderbuffer_size(0), 116 max_renderbuffer_size(0),
116 max_texture_image_units(0), 117 max_texture_image_units(0),
117 max_texture_size(0), 118 max_texture_size(0),
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 549
549 inline bool GLES2Implementation::GetTexParameterivHelper( 550 inline bool GLES2Implementation::GetTexParameterivHelper(
550 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 551 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
551 return false; 552 return false;
552 } 553 }
553 554
554 } // namespace gles2 555 } // namespace gles2
555 } // namespace gpu 556 } // namespace gpu
556 557
557 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ 558 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_impl_export.h ('k') | gpu/command_buffer/client/mapped_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698