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

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

Issue 2786963002: Revert of Make gl_clear_broken workaround support core profile and use it under AMD Linux Catalyst driver (Closed)
Patch Set: Created 3 years, 8 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 <string>
9
10 #include "base/containers/hash_tables.h"
11 #include "base/macros.h" 8 #include "base/macros.h"
12 #include "gpu/command_buffer/service/gl_utils.h" 9 #include "gpu/command_buffer/service/gl_utils.h"
13 #include "gpu/gpu_export.h" 10 #include "gpu/gpu_export.h"
14 11
15 namespace gfx { 12 namespace gfx {
16 class Size; 13 class Size;
17 } 14 }
18 15
19 namespace gpu { 16 namespace gpu {
20 namespace gles2 { 17 namespace gles2 {
21 class GLES2Decoder; 18 class GLES2Decoder;
22 19
23 class GPU_EXPORT ClearFramebufferResourceManager { 20 class GPU_EXPORT ClearFramebufferResourceManager {
24 public: 21 public:
25 ClearFramebufferResourceManager(const gles2::GLES2Decoder* decoder, 22 ClearFramebufferResourceManager(const gles2::GLES2Decoder* decoder);
26 const gl::GLVersionInfo& gl_version_info);
27 ~ClearFramebufferResourceManager(); 23 ~ClearFramebufferResourceManager();
28 24
29 25
30 void ClearFramebuffer(const gles2::GLES2Decoder* decoder, 26 void ClearFramebuffer(const gles2::GLES2Decoder* decoder,
31 const gfx::Size& framebuffer_size, 27 const gfx::Size& framebuffer_size,
32 GLbitfield mask, 28 GLbitfield mask,
33 GLfloat clear_color_red, 29 GLfloat clear_color_red,
34 GLfloat clear_color_green, 30 GLfloat clear_color_green,
35 GLfloat clear_color_blue, 31 GLfloat clear_color_blue,
36 GLfloat clear_color_alpha, 32 GLfloat clear_color_alpha,
37 GLfloat clear_depth_value, 33 GLfloat clear_depth_value,
38 GLint clear_stencil_value); 34 GLint clear_stencil_value);
39 35
40 private: 36 private:
41 void Initialize(const gles2::GLES2Decoder* decoder); 37 void Initialize(const gles2::GLES2Decoder* decoder);
42 void InitShader(const gles2::GLES2Decoder* decoder, GLenum type);
43 void Destroy(); 38 void Destroy();
44 39
45 // The attributes used during invocation of the extension. 40 // The attributes used during invocation of the extension.
46 static const GLuint kVertexPositionAttrib = 0; 41 static const GLuint kVertexPositionAttrib = 0;
47 42
48 bool initialized_; 43 bool initialized_;
49 bool is_desktop_core_profile_;
50 GLuint program_; 44 GLuint program_;
51 GLuint vao_; 45 GLuint depth_handle_;
52 GLint depth_handle_; 46 GLuint color_handle_;
53 GLint color_handle_;
54 GLuint buffer_id_; 47 GLuint buffer_id_;
55 base::hash_map<std::string, std::string> name_map_;
56 std::string vertex_shader_source_;
57 std::string fragment_shader_source_;
58 48
59 DISALLOW_COPY_AND_ASSIGN(ClearFramebufferResourceManager); 49 DISALLOW_COPY_AND_ASSIGN(ClearFramebufferResourceManager);
60 }; 50 };
61 51
62 } // namespace gles2 52 } // namespace gles2
63 } // namespace gpu 53 } // namespace gpu
64 54
65 #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