| 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), object_(0) {} | 13 : WebGLSharedObject(ctx), object_(0) {} |
| 14 | 14 |
| 15 void WebGLSharedPlatform3DObject::SetObject(GLuint object) { | 15 void WebGLSharedPlatform3DObject::SetObject(GLuint object) { |
| 16 // object==0 && deleted==false indicating an uninitialized state; | 16 // object==0 && deleted==false indicating an uninitialized state; |
| 17 ASSERT(!object_ && !IsDeleted()); | 17 DCHECK(!object_); |
| 18 DCHECK(!IsDeleted()); |
| 18 object_ = object; | 19 object_ = object; |
| 19 } | 20 } |
| 20 | 21 |
| 21 bool WebGLSharedPlatform3DObject::HasObject() const { | 22 bool WebGLSharedPlatform3DObject::HasObject() const { |
| 22 return object_ != 0; | 23 return object_ != 0; |
| 23 } | 24 } |
| 24 | 25 |
| 25 } // namespace blink | 26 } // namespace blink |
| OLD | NEW |