| 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/WebGLSharedPlatform3DObject.h" | 5 #include "modules/webgl/WebGLSharedPlatform3DObject.h" |
| 6 | 6 |
| 7 #include "modules/webgl/WebGLRenderingContextBase.h" | 7 #include "modules/webgl/WebGLRenderingContextBase.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 WebGLSharedPlatform3DObject::WebGLSharedPlatform3DObject(WebGLRenderingContextBa
se* ctx) | 11 WebGLSharedPlatform3DObject::WebGLSharedPlatform3DObject(WebGLRenderingContextBa
se* ctx) |
| 12 : WebGLSharedObject(ctx) | 12 : WebGLSharedObject(ctx) |
| 13 , m_object(0) | 13 , m_object(0) |
| 14 { | 14 { |
| 15 } | 15 } |
| 16 | 16 |
| 17 WebGLSharedPlatform3DObject::~WebGLSharedPlatform3DObject() | 17 WebGLSharedPlatform3DObject::~WebGLSharedPlatform3DObject() |
| 18 { | 18 { |
| 19 } | 19 } |
| 20 | 20 |
| 21 void WebGLSharedPlatform3DObject::setObject(Platform3DObject object) | 21 void WebGLSharedPlatform3DObject::setObject(GLuint object) |
| 22 { | 22 { |
| 23 // object==0 && deleted==false indicating an uninitialized state; | 23 // object==0 && deleted==false indicating an uninitialized state; |
| 24 ASSERT(!m_object && !isDeleted()); | 24 ASSERT(!m_object && !isDeleted()); |
| 25 m_object = object; | 25 m_object = object; |
| 26 } | 26 } |
| 27 | 27 |
| 28 bool WebGLSharedPlatform3DObject::hasObject() const | 28 bool WebGLSharedPlatform3DObject::hasObject() const |
| 29 { | 29 { |
| 30 return m_object != 0; | 30 return m_object != 0; |
| 31 } | 31 } |
| 32 | 32 |
| 33 } // namespace blink | 33 } // namespace blink |
| OLD | NEW |