OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file contains the GLES2Decoder class. | 5 // This file contains the GLES2Decoder class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 bool multisampling; | 37 bool multisampling; |
38 bool driver_bug_workarounds; | 38 bool driver_bug_workarounds; |
39 }; | 39 }; |
40 | 40 |
41 // This class implements the AsyncAPIInterface interface, decoding GLES2 | 41 // This class implements the AsyncAPIInterface interface, decoding GLES2 |
42 // commands and calling GL. | 42 // commands and calling GL. |
43 class GLES2Decoder : public CommonDecoder { | 43 class GLES2Decoder : public CommonDecoder { |
44 public: | 44 public: |
45 typedef error::Error Error; | 45 typedef error::Error Error; |
| 46 typedef base::Callback<void(int32 id, const std::string& msg)> MsgCallback; |
46 | 47 |
47 // Creates a decoder. | 48 // Creates a decoder. |
48 static GLES2Decoder* Create(ContextGroup* group); | 49 static GLES2Decoder* Create(ContextGroup* group); |
49 | 50 |
50 virtual ~GLES2Decoder(); | 51 virtual ~GLES2Decoder(); |
51 | 52 |
52 bool debug() const { | 53 bool debug() const { |
53 return debug_; | 54 return debug_; |
54 } | 55 } |
55 | 56 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 virtual bool ClearLevel( | 127 virtual bool ClearLevel( |
127 unsigned service_id, | 128 unsigned service_id, |
128 unsigned bind_target, | 129 unsigned bind_target, |
129 unsigned target, | 130 unsigned target, |
130 int level, | 131 int level, |
131 unsigned format, | 132 unsigned format, |
132 unsigned type, | 133 unsigned type, |
133 int width, | 134 int width, |
134 int height) = 0; | 135 int height) = 0; |
135 | 136 |
| 137 // A callback for messages from the decoder. |
| 138 virtual void SetMsgCallback(const MsgCallback& callback) = 0; |
| 139 |
136 protected: | 140 protected: |
137 GLES2Decoder(); | 141 GLES2Decoder(); |
138 | 142 |
139 private: | 143 private: |
140 bool debug_; | 144 bool debug_; |
141 | 145 |
142 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 146 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
143 }; | 147 }; |
144 | 148 |
145 } // namespace gles2 | 149 } // namespace gles2 |
146 } // namespace gpu | 150 } // namespace gpu |
147 | 151 |
148 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 152 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
OLD | NEW |