OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_CLEAR_FRAMEBUFFER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_CLEAR_FRAMEBUFFER_H_ |
| 7 |
| 8 #include "gpu/command_buffer/service/gl_utils.h" |
| 9 #include "gpu/gpu_export.h" |
| 10 |
| 11 namespace gfx { |
| 12 class Size; |
| 13 } |
| 14 |
| 15 namespace gpu { |
| 16 namespace gles2 { |
| 17 class GLES2Decoder; |
| 18 } |
| 19 |
| 20 class GPU_EXPORT ClearFramebufferResourceManager { |
| 21 public: |
| 22 ClearFramebufferResourceManager(const gles2::GLES2Decoder* decoder); |
| 23 ~ClearFramebufferResourceManager(); |
| 24 |
| 25 |
| 26 void ClearFramebuffer(const gles2::GLES2Decoder* decoder, |
| 27 const gfx::Size& framebuffer_size, |
| 28 GLbitfield mask, |
| 29 GLfloat clear_color_red, |
| 30 GLfloat clear_color_green, |
| 31 GLfloat clear_color_blue, |
| 32 GLfloat clear_color_alpha, |
| 33 GLfloat clear_depth_value, |
| 34 GLint clear_stencil_value); |
| 35 |
| 36 private: |
| 37 void Initialize(const gles2::GLES2Decoder* decoder); |
| 38 void Destroy(); |
| 39 |
| 40 // The attributes used during invocation of the extension. |
| 41 static const GLuint kVertexPositionAttrib = 0; |
| 42 |
| 43 bool initialized_; |
| 44 GLuint program_; |
| 45 GLuint depth_handle_; |
| 46 GLuint color_handle_; |
| 47 GLuint buffer_id_; |
| 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(ClearFramebufferResourceManager); |
| 50 }; |
| 51 |
| 52 } // namespace gpu. |
| 53 |
| 54 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_CLEAR_FRAMEBUFFER_H_ |
OLD | NEW |