| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gl/gl_surface_stub.h" | 5 #include "ui/gl/gl_surface_stub.h" |
| 6 | 6 |
| 7 #include "ui/gl/gl_bindings.h" |
| 8 |
| 7 namespace gfx { | 9 namespace gfx { |
| 8 | 10 |
| 11 GLSurfaceStub::GLSurfaceStub() : fbo_(0) {} |
| 12 |
| 13 void GLSurfaceStub::UpdateFBO() { |
| 14 GLint fbo = 0; |
| 15 glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &fbo); |
| 16 DCHECK_GE(fbo, 0); |
| 17 fbo_ = static_cast<unsigned int>(fbo); |
| 18 } |
| 19 |
| 9 void GLSurfaceStub::Destroy() { | 20 void GLSurfaceStub::Destroy() { |
| 10 } | 21 } |
| 11 | 22 |
| 12 bool GLSurfaceStub::IsOffscreen() { | 23 bool GLSurfaceStub::IsOffscreen() { |
| 13 return false; | 24 return false; |
| 14 } | 25 } |
| 15 | 26 |
| 27 unsigned int GLSurfaceStub::GetBackingFrameBufferObject() { |
| 28 return fbo_; |
| 29 } |
| 30 |
| 16 bool GLSurfaceStub::SwapBuffers() { | 31 bool GLSurfaceStub::SwapBuffers() { |
| 17 return true; | 32 return true; |
| 18 } | 33 } |
| 19 | 34 |
| 20 gfx::Size GLSurfaceStub::GetSize() { | 35 gfx::Size GLSurfaceStub::GetSize() { |
| 21 return size_; | 36 return size_; |
| 22 } | 37 } |
| 23 | 38 |
| 24 void* GLSurfaceStub::GetHandle() { | 39 void* GLSurfaceStub::GetHandle() { |
| 25 return NULL; | 40 return NULL; |
| 26 } | 41 } |
| 27 | 42 |
| 28 GLSurfaceStub::~GLSurfaceStub() {} | 43 GLSurfaceStub::~GLSurfaceStub() {} |
| 29 | 44 |
| 30 } // namespace gfx | 45 } // namespace gfx |
| OLD | NEW |