| 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 "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" | 7 #include "content/renderer/gpu/webgraphicscontext3d_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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 } | 326 } |
| 327 | 327 |
| 328 void WebGraphicsContext3DCommandBufferImpl::unmapTexSubImage2DCHROMIUM( | 328 void WebGraphicsContext3DCommandBufferImpl::unmapTexSubImage2DCHROMIUM( |
| 329 const void* mem) { | 329 const void* mem) { |
| 330 gl_->UnmapTexSubImage2DCHROMIUM(mem); | 330 gl_->UnmapTexSubImage2DCHROMIUM(mem); |
| 331 } | 331 } |
| 332 | 332 |
| 333 void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM( | 333 void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM( |
| 334 WebGLId texture, WebGLId parentTexture) { | 334 WebGLId texture, WebGLId parentTexture) { |
| 335 TRACE_EVENT0("gpu", "WebGfxCtx3DCmdBfrImpl::copyTextureToCompositor"); | 335 TRACE_EVENT0("gpu", "WebGfxCtx3DCmdBfrImpl::copyTextureToCompositor"); |
| 336 | 336 gl_->CopyTextureToParentTextureCHROMIUM(texture, parentTexture); |
| 337 gl_->Flush(); | 337 gl_->Flush(); |
| 338 context_->MapExternalResourceToParent(gpu::resource_type::kTexture, | |
| 339 texture, | |
| 340 parentTexture); | |
| 341 } | 338 } |
| 342 | 339 |
| 343 void WebGraphicsContext3DCommandBufferImpl:: | 340 void WebGraphicsContext3DCommandBufferImpl:: |
| 344 rateLimitOffscreenContextCHROMIUM() { | 341 rateLimitOffscreenContextCHROMIUM() { |
| 345 gl_->RateLimitOffscreenContextCHROMIUM(); | 342 gl_->RateLimitOffscreenContextCHROMIUM(); |
| 346 } | 343 } |
| 347 | 344 |
| 348 WebKit::WebString WebGraphicsContext3DCommandBufferImpl:: | 345 WebKit::WebString WebGraphicsContext3DCommandBufferImpl:: |
| 349 getRequestableExtensionsCHROMIUM() { | 346 getRequestableExtensionsCHROMIUM() { |
| 350 return WebKit::WebString::fromUTF8( | 347 return WebKit::WebString::fromUTF8( |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 context_lost_callback_->onContextLost(); | 1019 context_lost_callback_->onContextLost(); |
| 1023 } | 1020 } |
| 1024 | 1021 |
| 1025 RenderView* renderview = | 1022 RenderView* renderview = |
| 1026 web_view_ ? RenderView::FromWebView(web_view_) : NULL; | 1023 web_view_ ? RenderView::FromWebView(web_view_) : NULL; |
| 1027 if (renderview) | 1024 if (renderview) |
| 1028 renderview->OnViewContextSwapBuffersAborted(); | 1025 renderview->OnViewContextSwapBuffersAborted(); |
| 1029 } | 1026 } |
| 1030 | 1027 |
| 1031 #endif // defined(ENABLE_GPU) | 1028 #endif // defined(ENABLE_GPU) |
| OLD | NEW |