OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "modules/webgl/WebGLSampler.h" | 5 #include "modules/webgl/WebGLSampler.h" |
6 | 6 |
7 #include "gpu/command_buffer/client/gles2_interface.h" | 7 #include "gpu/command_buffer/client/gles2_interface.h" |
8 #include "modules/webgl/WebGL2RenderingContextBase.h" | 8 #include "modules/webgl/WebGL2RenderingContextBase.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 10 matching lines...) Expand all Loading... |
21 } | 21 } |
22 | 22 |
23 WebGLSampler::WebGLSampler(WebGL2RenderingContextBase* ctx) | 23 WebGLSampler::WebGLSampler(WebGL2RenderingContextBase* ctx) |
24 : WebGLSharedPlatform3DObject(ctx) | 24 : WebGLSharedPlatform3DObject(ctx) |
25 { | 25 { |
26 GLuint sampler; | 26 GLuint sampler; |
27 ctx->contextGL()->GenSamplers(1, &sampler); | 27 ctx->contextGL()->GenSamplers(1, &sampler); |
28 setObject(sampler); | 28 setObject(sampler); |
29 } | 29 } |
30 | 30 |
31 void WebGLSampler::deleteObjectImpl(WebGraphicsContext3D* context3d, gpu::gles2:
:GLES2Interface* gl) | 31 void WebGLSampler::deleteObjectImpl(gpu::gles2::GLES2Interface* gl) |
32 { | 32 { |
33 gl->DeleteSamplers(1, &m_object); | 33 gl->DeleteSamplers(1, &m_object); |
34 m_object = 0; | 34 m_object = 0; |
35 } | 35 } |
36 | 36 |
37 } // namespace blink | 37 } // namespace blink |
OLD | NEW |