| 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( | 11 WebGLSharedPlatform3DObject::WebGLSharedPlatform3DObject( |
| 12 WebGLRenderingContextBase* ctx) | 12 WebGLRenderingContextBase* ctx) |
| 13 : WebGLSharedObject(ctx), m_object(0) {} | 13 : WebGLSharedObject(ctx), m_object(0) {} |
| 14 | 14 |
| 15 WebGLSharedPlatform3DObject::~WebGLSharedPlatform3DObject() {} | |
| 16 | |
| 17 void WebGLSharedPlatform3DObject::setObject(GLuint object) { | 15 void WebGLSharedPlatform3DObject::setObject(GLuint object) { |
| 18 // object==0 && deleted==false indicating an uninitialized state; | 16 // object==0 && deleted==false indicating an uninitialized state; |
| 19 ASSERT(!m_object && !isDeleted()); | 17 ASSERT(!m_object && !isDeleted()); |
| 20 m_object = object; | 18 m_object = object; |
| 21 } | 19 } |
| 22 | 20 |
| 23 bool WebGLSharedPlatform3DObject::hasObject() const { | 21 bool WebGLSharedPlatform3DObject::hasObject() const { |
| 24 return m_object != 0; | 22 return m_object != 0; |
| 25 } | 23 } |
| 26 | 24 |
| 27 } // namespace blink | 25 } // namespace blink |
| OLD | NEW |