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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 |
337 gl_->Flush(); | 337 gl_->Flush(); |
338 context_->MapExternalResourceToParent(gpu::resource_type::kTexture, | 338 context_->MapExternalResourceToParent(gpu::resource_type::kTexture, |
339 texture, | 339 texture, |
340 parentTexture); | 340 parentTexture); |
341 } | 341 } |
342 | 342 |
343 void WebGraphicsContext3DCommandBufferImpl::mapExternalTextureCHROMIUM( | |
344 WebGLId source_texture, WebGraphicsContext3D* source_context, | |
345 WebGLId destination_texture) { | |
346 WebGraphicsContext3DCommandBufferImpl* source_cmdbuffer_context = | |
347 static_cast<WebGraphicsContext3DCommandBufferImpl*>(source_context); | |
apatrick_chromium
2011/07/29 23:59:04
indentation
| |
348 context_->MapExternalResource(gpu::resource_type::kTexture, | |
349 source_texture, | |
350 source_cmdbuffer_context->context(), | |
351 destination_texture); | |
352 | |
353 } | |
354 | |
355 | |
343 void WebGraphicsContext3DCommandBufferImpl:: | 356 void WebGraphicsContext3DCommandBufferImpl:: |
344 rateLimitOffscreenContextCHROMIUM() { | 357 rateLimitOffscreenContextCHROMIUM() { |
345 gl_->RateLimitOffscreenContextCHROMIUM(); | 358 gl_->RateLimitOffscreenContextCHROMIUM(); |
346 } | 359 } |
347 | 360 |
348 WebKit::WebString WebGraphicsContext3DCommandBufferImpl:: | 361 WebKit::WebString WebGraphicsContext3DCommandBufferImpl:: |
349 getRequestableExtensionsCHROMIUM() { | 362 getRequestableExtensionsCHROMIUM() { |
350 return WebKit::WebString::fromUTF8( | 363 return WebKit::WebString::fromUTF8( |
351 gl_->GetRequestableExtensionsCHROMIUM()); | 364 gl_->GetRequestableExtensionsCHROMIUM()); |
352 } | 365 } |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1022 context_lost_callback_->onContextLost(); | 1035 context_lost_callback_->onContextLost(); |
1023 } | 1036 } |
1024 | 1037 |
1025 RenderView* renderview = | 1038 RenderView* renderview = |
1026 web_view_ ? RenderView::FromWebView(web_view_) : NULL; | 1039 web_view_ ? RenderView::FromWebView(web_view_) : NULL; |
1027 if (renderview) | 1040 if (renderview) |
1028 renderview->OnViewContextSwapBuffersAborted(); | 1041 renderview->OnViewContextSwapBuffersAborted(); |
1029 } | 1042 } |
1030 | 1043 |
1031 #endif // defined(ENABLE_GPU) | 1044 #endif // defined(ENABLE_GPU) |
OLD | NEW |