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

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

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

Powered by Google App Engine
This is Rietveld 408576698