| OLD | NEW |
| 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 #include "gpu/command_buffer/service/gles2_cmd_clear_framebuffer.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_clear_framebuffer.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | |
| 8 #include "gpu/command_buffer/service/gl_utils.h" | 7 #include "gpu/command_buffer/service/gl_utils.h" |
| 9 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 10 #include "ui/gfx/geometry/size.h" | 9 #include "ui/gfx/geometry/size.h" |
| 11 | 10 |
| 12 namespace { | 11 namespace { |
| 13 | 12 |
| 14 #define SHADER(src) \ | 13 #define SHADER(src) \ |
| 15 "#ifdef GL_ES\n" \ | 14 "#ifdef GL_ES\n" \ |
| 16 "precision mediump float;\n" \ | 15 "precision mediump float;\n" \ |
| 17 "#endif\n" #src | 16 "#endif\n" #src |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 glViewport(0, 0, framebuffer_size.width(), framebuffer_size.height()); | 179 glViewport(0, 0, framebuffer_size.width(), framebuffer_size.height()); |
| 181 glDrawArrays(GL_TRIANGLE_FAN, 0, 4); | 180 glDrawArrays(GL_TRIANGLE_FAN, 0, 4); |
| 182 | 181 |
| 183 decoder->RestoreAllAttributes(); | 182 decoder->RestoreAllAttributes(); |
| 184 decoder->RestoreProgramBindings(); | 183 decoder->RestoreProgramBindings(); |
| 185 decoder->RestoreBufferBindings(); | 184 decoder->RestoreBufferBindings(); |
| 186 decoder->RestoreGlobalState(); | 185 decoder->RestoreGlobalState(); |
| 187 } | 186 } |
| 188 | 187 |
| 189 } // namespace gpu | 188 } // namespace gpu |
| OLD | NEW |