OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
6 | 6 |
7 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" | 7 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" |
8 | 8 |
9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
10 #ifndef GL_GLEXT_PROTOTYPES | 10 #ifndef GL_GLEXT_PROTOTYPES |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 DCHECK(context_); | 751 DCHECK(context_); |
752 return context_->GetParentTextureId(); | 752 return context_->GetParentTextureId(); |
753 } | 753 } |
754 | 754 |
755 void WebGraphicsContext3DInProcessCommandBufferImpl::prepareTexture() { | 755 void WebGraphicsContext3DInProcessCommandBufferImpl::prepareTexture() { |
756 // Copies the contents of the off-screen render target into the texture | 756 // Copies the contents of the off-screen render target into the texture |
757 // used by the compositor. | 757 // used by the compositor. |
758 context_->SwapBuffers(); | 758 context_->SwapBuffers(); |
759 } | 759 } |
760 | 760 |
| 761 void WebGraphicsContext3DInProcessCommandBufferImpl::postSubBufferCHROMIUM( |
| 762 int x, int y, int width, int height) { |
| 763 gl_->PostSubBufferCHROMIUM(x, y, width, height); |
| 764 } |
| 765 |
761 void WebGraphicsContext3DInProcessCommandBufferImpl::reshape( | 766 void WebGraphicsContext3DInProcessCommandBufferImpl::reshape( |
762 int width, int height) { | 767 int width, int height) { |
763 cached_width_ = width; | 768 cached_width_ = width; |
764 cached_height_ = height; | 769 cached_height_ = height; |
765 | 770 |
766 // TODO(gmam): See if we can comment this in. | 771 // TODO(gmam): See if we can comment this in. |
767 // ClearContext(); | 772 // ClearContext(); |
768 | 773 |
769 gl_->ResizeCHROMIUM(width, height); | 774 gl_->ResizeCHROMIUM(width, height); |
770 | 775 |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1666 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; | 1671 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; |
1667 if (context_lost_callback_) { | 1672 if (context_lost_callback_) { |
1668 context_lost_callback_->onContextLost(); | 1673 context_lost_callback_->onContextLost(); |
1669 } | 1674 } |
1670 } | 1675 } |
1671 | 1676 |
1672 } // namespace gpu | 1677 } // namespace gpu |
1673 } // namespace webkit | 1678 } // namespace webkit |
1674 | 1679 |
1675 #endif // defined(ENABLE_GPU) | 1680 #endif // defined(ENABLE_GPU) |
OLD | NEW |