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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.h

Issue 12806006: Add EncodeBackbufferCHROMIUM support to GLES2 command stream (Closed) Base URL: https://chromium.googlesource.com/chromium/src@yuv_2
Patch Set: Removed extraneous file. Created 7 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
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 // 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 const std::string& shader)> ShaderCacheCallback; 82 const std::string& shader)> ShaderCacheCallback;
83 83
84 // This class implements the AsyncAPIInterface interface, decoding GLES2 84 // This class implements the AsyncAPIInterface interface, decoding GLES2
85 // commands and calling GL. 85 // commands and calling GL.
86 class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, 86 class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>,
87 public CommonDecoder { 87 public CommonDecoder {
88 public: 88 public:
89 typedef error::Error Error; 89 typedef error::Error Error;
90 typedef base::Callback<void(int32 id, const std::string& msg)> MsgCallback; 90 typedef base::Callback<void(int32 id, const std::string& msg)> MsgCallback;
91 typedef base::Callback<bool(uint32 id)> WaitSyncPointCallback; 91 typedef base::Callback<bool(uint32 id)> WaitSyncPointCallback;
92 typedef base::Callback<void(void)> EncodeBackbufferCallback;
92 93
93 // Creates a decoder. 94 // Creates a decoder.
94 static GLES2Decoder* Create(ContextGroup* group); 95 static GLES2Decoder* Create(ContextGroup* group);
95 96
96 virtual ~GLES2Decoder(); 97 virtual ~GLES2Decoder();
97 98
98 bool debug() const { 99 bool debug() const {
99 return debug_; 100 return debug_;
100 } 101 }
101 102
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 280
280 // A callback for messages from the decoder. 281 // A callback for messages from the decoder.
281 virtual void SetMsgCallback(const MsgCallback& callback) = 0; 282 virtual void SetMsgCallback(const MsgCallback& callback) = 0;
282 virtual void SetShaderCacheCallback(const ShaderCacheCallback& callback) = 0; 283 virtual void SetShaderCacheCallback(const ShaderCacheCallback& callback) = 0;
283 284
284 // Sets the callback for waiting on a sync point. The callback returns the 285 // Sets the callback for waiting on a sync point. The callback returns the
285 // scheduling status (i.e. true if the channel is still scheduled). 286 // scheduling status (i.e. true if the channel is still scheduled).
286 virtual void SetWaitSyncPointCallback( 287 virtual void SetWaitSyncPointCallback(
287 const WaitSyncPointCallback& callback) = 0; 288 const WaitSyncPointCallback& callback) = 0;
288 289
290 // Sets the callback for encoding a backbuffer. The callback schedules the
291 // backbuffer to be encoded.
292 virtual void SetEncodeBackbufferCallback(
293 const EncodeBackbufferCallback& callback) = 0;
294
289 virtual uint32 GetTextureUploadCount() = 0; 295 virtual uint32 GetTextureUploadCount() = 0;
290 virtual base::TimeDelta GetTotalTextureUploadTime() = 0; 296 virtual base::TimeDelta GetTotalTextureUploadTime() = 0;
291 virtual base::TimeDelta GetTotalProcessingCommandsTime() = 0; 297 virtual base::TimeDelta GetTotalProcessingCommandsTime() = 0;
292 virtual void AddProcessingCommandsTime(base::TimeDelta) = 0; 298 virtual void AddProcessingCommandsTime(base::TimeDelta) = 0;
293 299
294 // Returns true if the context was just lost due to e.g. GL_ARB_robustness. 300 // Returns true if the context was just lost due to e.g. GL_ARB_robustness.
295 virtual bool WasContextLost() = 0; 301 virtual bool WasContextLost() = 0;
296 302
297 // Lose this context. 303 // Lose this context.
298 virtual void LoseContext(uint32 reset_status) = 0; 304 virtual void LoseContext(uint32 reset_status) = 0;
(...skipping 11 matching lines...) Expand all
310 bool log_commands_; 316 bool log_commands_;
311 bool log_synthesized_gl_errors_; 317 bool log_synthesized_gl_errors_;
312 static bool testing_force_is_angle_; 318 static bool testing_force_is_angle_;
313 319
314 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); 320 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder);
315 }; 321 };
316 322
317 } // namespace gles2 323 } // namespace gles2
318 } // namespace gpu 324 } // namespace gpu
319 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ 325 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_ids_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698