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 "cc/output/gl_renderer.h" // For the GLC() macro. | 9 #include "cc/output/gl_renderer.h" // For the GLC() macro. |
10 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 10 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
11 #include "third_party/khronos/GLES2/gl2.h" | 11 #include "third_party/khronos/GLES2/gl2.h" |
12 | 12 |
13 using WebKit::WebGraphicsContext3D; | 13 using blink::WebGraphicsContext3D; |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 | 16 |
17 ProgramBindingBase::ProgramBindingBase() | 17 ProgramBindingBase::ProgramBindingBase() |
18 : program_(0), | 18 : program_(0), |
19 vertex_shader_id_(0), | 19 vertex_shader_id_(0), |
20 fragment_shader_id_(0), | 20 fragment_shader_id_(0), |
21 initialized_(false) {} | 21 initialized_(false) {} |
22 | 22 |
23 ProgramBindingBase::~ProgramBindingBase() { | 23 ProgramBindingBase::~ProgramBindingBase() { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 GLC(context, context->deleteShader(vertex_shader_id_)); | 132 GLC(context, context->deleteShader(vertex_shader_id_)); |
133 vertex_shader_id_ = 0; | 133 vertex_shader_id_ = 0; |
134 } | 134 } |
135 if (fragment_shader_id_) { | 135 if (fragment_shader_id_) { |
136 GLC(context, context->deleteShader(fragment_shader_id_)); | 136 GLC(context, context->deleteShader(fragment_shader_id_)); |
137 fragment_shader_id_ = 0; | 137 fragment_shader_id_ = 0; |
138 } | 138 } |
139 } | 139 } |
140 | 140 |
141 } // namespace cc | 141 } // namespace cc |
OLD | NEW |