OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/output/program_binding.h" | 5 #include "cc/output/program_binding.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "cc/output/geometry_binding.h" | 8 #include "cc/output/geometry_binding.h" |
9 #include "gpu/command_buffer/client/gles2_interface.h" | 9 #include "gpu/command_buffer/client/gles2_interface.h" |
10 #include "third_party/khronos/GLES2/gl2.h" | |
11 | 10 |
12 using gpu::gles2::GLES2Interface; | 11 using gpu::gles2::GLES2Interface; |
13 | 12 |
14 namespace cc { | 13 namespace cc { |
15 | 14 |
16 ProgramBindingBase::ProgramBindingBase() | 15 ProgramBindingBase::ProgramBindingBase() |
17 : program_(0), | 16 : program_(0), |
18 vertex_shader_id_(0), | 17 vertex_shader_id_(0), |
19 fragment_shader_id_(0), | 18 fragment_shader_id_(0), |
20 initialized_(false) {} | 19 initialized_(false) {} |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 context->DeleteShader(vertex_shader_id_); | 123 context->DeleteShader(vertex_shader_id_); |
125 vertex_shader_id_ = 0; | 124 vertex_shader_id_ = 0; |
126 } | 125 } |
127 if (fragment_shader_id_) { | 126 if (fragment_shader_id_) { |
128 context->DeleteShader(fragment_shader_id_); | 127 context->DeleteShader(fragment_shader_id_); |
129 fragment_shader_id_ = 0; | 128 fragment_shader_id_ = 0; |
130 } | 129 } |
131 } | 130 } |
132 | 131 |
133 } // namespace cc | 132 } // namespace cc |
OLD | NEW |