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

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

Issue 2125293002: Revert of gpu: Use a VAO as required by the core profile in ClearFramebuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_clear_framebuffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_SERVICE_GLES2_CMD_CLEAR_FRAMEBUFFER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_CLEAR_FRAMEBUFFER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_CLEAR_FRAMEBUFFER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_CLEAR_FRAMEBUFFER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "gpu/command_buffer/service/feature_info.h"
10 #include "gpu/command_buffer/service/gl_utils.h" 9 #include "gpu/command_buffer/service/gl_utils.h"
11 #include "gpu/gpu_export.h" 10 #include "gpu/gpu_export.h"
12 11
13 namespace gfx { 12 namespace gfx {
14 class Size; 13 class Size;
15 } 14 }
16 15
17 namespace gpu { 16 namespace gpu {
18 namespace gles2 { 17 namespace gles2 {
19 class GLES2Decoder; 18 class GLES2Decoder;
20 } 19 }
21 20
22 class GPU_EXPORT ClearFramebufferResourceManager { 21 class GPU_EXPORT ClearFramebufferResourceManager {
23 public: 22 public:
24 ClearFramebufferResourceManager( 23 ClearFramebufferResourceManager(const gles2::GLES2Decoder* decoder);
25 const gles2::GLES2Decoder* decoder,
26 const gles2::FeatureInfo::FeatureFlags& feature_flags);
27 ~ClearFramebufferResourceManager(); 24 ~ClearFramebufferResourceManager();
28 25
29 26
30 void ClearFramebuffer(const gles2::GLES2Decoder* decoder, 27 void ClearFramebuffer(const gles2::GLES2Decoder* decoder,
31 const gfx::Size& framebuffer_size, 28 const gfx::Size& framebuffer_size,
32 GLbitfield mask, 29 GLbitfield mask,
33 GLfloat clear_color_red, 30 GLfloat clear_color_red,
34 GLfloat clear_color_green, 31 GLfloat clear_color_green,
35 GLfloat clear_color_blue, 32 GLfloat clear_color_blue,
36 GLfloat clear_color_alpha, 33 GLfloat clear_color_alpha,
37 GLfloat clear_depth_value, 34 GLfloat clear_depth_value,
38 GLint clear_stencil_value); 35 GLint clear_stencil_value);
39 36
40 private: 37 private:
41 void Initialize(const gles2::GLES2Decoder* decoder, 38 void Initialize(const gles2::GLES2Decoder* decoder);
42 const gles2::FeatureInfo::FeatureFlags& feature_flags);
43 void Destroy(); 39 void Destroy();
44 40
45 // The attributes used during invocation of the extension. 41 // The attributes used during invocation of the extension.
46 static const GLuint kVertexPositionAttrib = 0; 42 static const GLuint kVertexPositionAttrib = 0;
47 43
48 bool initialized_; 44 bool initialized_;
49 GLuint program_; 45 GLuint program_;
50 GLuint vao_;
51 GLuint depth_handle_; 46 GLuint depth_handle_;
52 GLuint color_handle_; 47 GLuint color_handle_;
53 GLuint buffer_id_; 48 GLuint buffer_id_;
54 49
55 DISALLOW_COPY_AND_ASSIGN(ClearFramebufferResourceManager); 50 DISALLOW_COPY_AND_ASSIGN(ClearFramebufferResourceManager);
56 }; 51 };
57 52
58 } // namespace gpu. 53 } // namespace gpu.
59 54
60 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_CLEAR_FRAMEBUFFER_H_ 55 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_CLEAR_FRAMEBUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_clear_framebuffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698