Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "modules/webgl/CHROMIUMValuebuffer.h" | 5 #include "modules/webgl/CHROMIUMValuebuffer.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_interface.h" | |
| 7 #include "modules/webgl/WebGLRenderingContextBase.h" | 8 #include "modules/webgl/WebGLRenderingContextBase.h" |
| 8 | 9 |
| 9 namespace blink { | 10 namespace blink { |
| 10 | 11 |
| 11 CHROMIUMValuebuffer* CHROMIUMValuebuffer::create(WebGLRenderingContextBase* ctx) | 12 CHROMIUMValuebuffer* CHROMIUMValuebuffer::create(WebGLRenderingContextBase* ctx) |
| 12 { | 13 { |
| 13 return new CHROMIUMValuebuffer(ctx); | 14 return new CHROMIUMValuebuffer(ctx); |
| 14 } | 15 } |
| 15 | 16 |
| 16 CHROMIUMValuebuffer::~CHROMIUMValuebuffer() | 17 CHROMIUMValuebuffer::~CHROMIUMValuebuffer() |
| 17 { | 18 { |
| 18 // See the comment in WebGLObject::detachAndDeleteObject(). | 19 // See the comment in WebGLObject::detachAndDeleteObject(). |
| 19 detachAndDeleteObject(); | 20 detachAndDeleteObject(); |
| 20 } | 21 } |
| 21 | 22 |
| 22 CHROMIUMValuebuffer::CHROMIUMValuebuffer(WebGLRenderingContextBase* ctx) | 23 CHROMIUMValuebuffer::CHROMIUMValuebuffer(WebGLRenderingContextBase* ctx) |
| 23 : WebGLSharedPlatform3DObject(ctx) | 24 : WebGLSharedPlatform3DObject(ctx) |
| 24 , m_hasEverBeenBound(false) | 25 , m_hasEverBeenBound(false) |
| 25 { | 26 { |
| 26 setObject(ctx->webContext()->createValuebufferCHROMIUM()); | 27 uint32_t buffer; |
|
Ken Russell (switch to Gerrit)
2016/03/19 01:46:39
Can we use GLuint here and throughout the Blink co
danakj
2016/03/21 22:27:02
Done.
| |
| 28 ctx->contextGL()->GenValuebuffersCHROMIUM(1, &buffer); | |
| 29 setObject(buffer); | |
| 27 } | 30 } |
| 28 | 31 |
| 29 void CHROMIUMValuebuffer::deleteObjectImpl(WebGraphicsContext3D* context3d, gpu: :gles2::GLES2Interface* gl) | 32 void CHROMIUMValuebuffer::deleteObjectImpl(WebGraphicsContext3D* context3d, gpu: :gles2::GLES2Interface* gl) |
| 30 { | 33 { |
| 31 context3d->deleteValuebufferCHROMIUM(m_object); | 34 gl->DeleteValuebuffersCHROMIUM(1, &m_object); |
| 32 m_object = 0; | 35 m_object = 0; |
| 33 } | 36 } |
| 34 | 37 |
| 35 } // namespace blink | 38 } // namespace blink |
| OLD | NEW |