Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc

Issue 8536045: Make command buffer free transfer buffer when switching tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "third_party/khronos/GLES2/gl2.h" 9 #include "third_party/khronos/GLES2/gl2.h"
10 #ifndef GL_GLEXT_PROTOTYPES 10 #ifndef GL_GLEXT_PROTOTYPES
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 target, level, xoffset, yoffset, width, height, format, type, access); 424 target, level, xoffset, yoffset, width, height, format, type, access);
425 } 425 }
426 426
427 void WebGraphicsContext3DCommandBufferImpl::unmapTexSubImage2DCHROMIUM( 427 void WebGraphicsContext3DCommandBufferImpl::unmapTexSubImage2DCHROMIUM(
428 const void* mem) { 428 const void* mem) {
429 gl_->UnmapTexSubImage2DCHROMIUM(mem); 429 gl_->UnmapTexSubImage2DCHROMIUM(mem);
430 } 430 }
431 431
432 void WebGraphicsContext3DCommandBufferImpl::setVisibilityCHROMIUM( 432 void WebGraphicsContext3DCommandBufferImpl::setVisibilityCHROMIUM(
433 bool visible) { 433 bool visible) {
434 if (!visible)
435 gl_->FreeUnusedSharedMemory();
436 gl_->Flush(); 434 gl_->Flush();
437 context_->SetSurfaceVisible(visible); 435 context_->SetSurfaceVisible(visible);
436 if (!visible)
437 gl_->FreeEverything();
438 } 438 }
439 439
440 void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM( 440 void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM(
441 WebGLId texture, WebGLId parentTexture) { 441 WebGLId texture, WebGLId parentTexture) {
442 NOTIMPLEMENTED(); 442 NOTIMPLEMENTED();
443 } 443 }
444 444
445 void WebGraphicsContext3DCommandBufferImpl:: 445 void WebGraphicsContext3DCommandBufferImpl::
446 rateLimitOffscreenContextCHROMIUM() { 446 rateLimitOffscreenContextCHROMIUM() {
447 gl_->RateLimitOffscreenContextCHROMIUM(); 447 gl_->RateLimitOffscreenContextCHROMIUM();
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 if (context_lost_callback_) { 1173 if (context_lost_callback_) {
1174 context_lost_callback_->onContextLost(); 1174 context_lost_callback_->onContextLost();
1175 } 1175 }
1176 RenderViewImpl* renderview = 1176 RenderViewImpl* renderview =
1177 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; 1177 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL;
1178 if (renderview) 1178 if (renderview)
1179 renderview->OnViewContextSwapBuffersAborted(); 1179 renderview->OnViewContextSwapBuffersAborted();
1180 } 1180 }
1181 1181
1182 #endif // defined(ENABLE_GPU) 1182 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698