| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/pepper_platform_context_3d_impl.h" | 5 #include "chrome/renderer/pepper_platform_context_3d_impl.h" |
| 6 | 6 |
| 7 #include "chrome/renderer/ggl/ggl.h" | 7 #include "chrome/renderer/ggl/ggl.h" |
| 8 #include "chrome/renderer/gpu_channel_host.h" | 8 #include "chrome/renderer/gpu_channel_host.h" |
| 9 #include "chrome/renderer/render_thread.h" | 9 #include "chrome/renderer/render_thread.h" |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 bool PlatformContext3DImpl::SwapBuffers() { | 62 bool PlatformContext3DImpl::SwapBuffers() { |
| 63 DCHECK(context_); | 63 DCHECK(context_); |
| 64 return ggl::SwapBuffers(context_); | 64 return ggl::SwapBuffers(context_); |
| 65 } | 65 } |
| 66 | 66 |
| 67 unsigned PlatformContext3DImpl::GetError() { | 67 unsigned PlatformContext3DImpl::GetError() { |
| 68 DCHECK(context_); | 68 DCHECK(context_); |
| 69 return ggl::GetError(context_); | 69 return ggl::GetError(context_); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void PlatformContext3DImpl::ResizeBackingTexture(const gfx::Size& size) { | |
| 73 DCHECK(context_); | |
| 74 ggl::ResizeOffscreenContext(context_, size); | |
| 75 } | |
| 76 | |
| 77 void PlatformContext3DImpl::SetSwapBuffersCallback(Callback0::Type* callback) { | 72 void PlatformContext3DImpl::SetSwapBuffersCallback(Callback0::Type* callback) { |
| 78 DCHECK(context_); | 73 DCHECK(context_); |
| 79 ggl::SetSwapBuffersCallback(context_, callback); | 74 ggl::SetSwapBuffersCallback(context_, callback); |
| 80 } | 75 } |
| 81 | 76 |
| 82 unsigned PlatformContext3DImpl::GetBackingTextureId() { | 77 unsigned PlatformContext3DImpl::GetBackingTextureId() { |
| 83 DCHECK(context_); | 78 DCHECK(context_); |
| 84 return ggl::GetParentTextureId(context_); | 79 return ggl::GetParentTextureId(context_); |
| 85 } | 80 } |
| 86 | 81 |
| 87 gpu::gles2::GLES2Implementation* | 82 gpu::gles2::GLES2Implementation* |
| 88 PlatformContext3DImpl::GetGLES2Implementation() { | 83 PlatformContext3DImpl::GetGLES2Implementation() { |
| 89 DCHECK(context_); | 84 DCHECK(context_); |
| 90 return ggl::GetImplementation(context_); | 85 return ggl::GetImplementation(context_); |
| 91 } | 86 } |
| 92 | 87 |
| 93 #endif // ENABLE_GPU | 88 #endif // ENABLE_GPU |
| 94 | 89 |
| OLD | NEW |