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

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

Issue 8373006: Rename setVisibility to setVisibilityCHROMIUM and expose as GL_CHROIMIUM_set_visibility extension. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 9 years, 2 months 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
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 "gpu/GLES2/gl2.h" 9 #include "gpu/GLES2/gl2.h"
10 #ifndef GL_GLEXT_PROTOTYPES 10 #ifndef GL_GLEXT_PROTOTYPES
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 cached_width_ = width; 295 cached_width_ = width;
296 cached_height_ = height; 296 cached_height_ = height;
297 297
298 gl_->ResizeCHROMIUM(width, height); 298 gl_->ResizeCHROMIUM(width, height);
299 299
300 #ifdef FLIP_FRAMEBUFFER_VERTICALLY 300 #ifdef FLIP_FRAMEBUFFER_VERTICALLY
301 scanline_.reset(new uint8[width * 4]); 301 scanline_.reset(new uint8[width * 4]);
302 #endif // FLIP_FRAMEBUFFER_VERTICALLY 302 #endif // FLIP_FRAMEBUFFER_VERTICALLY
303 } 303 }
304 304
305 void WebGraphicsContext3DCommandBufferImpl::setVisibility(bool visible) {
306 gl_->Flush();
307 context_->SetSurfaceVisible(visible);
308 }
309
310 #ifdef FLIP_FRAMEBUFFER_VERTICALLY 305 #ifdef FLIP_FRAMEBUFFER_VERTICALLY
311 void WebGraphicsContext3DCommandBufferImpl::FlipVertically( 306 void WebGraphicsContext3DCommandBufferImpl::FlipVertically(
312 uint8* framebuffer, 307 uint8* framebuffer,
313 unsigned int width, 308 unsigned int width,
314 unsigned int height) { 309 unsigned int height) {
315 uint8* scanline = scanline_.get(); 310 uint8* scanline = scanline_.get();
316 if (!scanline) 311 if (!scanline)
317 return; 312 return;
318 unsigned int row_bytes = width * 4; 313 unsigned int row_bytes = width * 4;
319 unsigned int count = height / 2; 314 unsigned int count = height / 2;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 WGC3Denum access) { 408 WGC3Denum access) {
414 return gl_->MapTexSubImage2DCHROMIUM( 409 return gl_->MapTexSubImage2DCHROMIUM(
415 target, level, xoffset, yoffset, width, height, format, type, access); 410 target, level, xoffset, yoffset, width, height, format, type, access);
416 } 411 }
417 412
418 void WebGraphicsContext3DCommandBufferImpl::unmapTexSubImage2DCHROMIUM( 413 void WebGraphicsContext3DCommandBufferImpl::unmapTexSubImage2DCHROMIUM(
419 const void* mem) { 414 const void* mem) {
420 gl_->UnmapTexSubImage2DCHROMIUM(mem); 415 gl_->UnmapTexSubImage2DCHROMIUM(mem);
421 } 416 }
422 417
418 void WebGraphicsContext3DCommandBufferImpl::setVisibilityCHROMIUM(
419 bool visible) {
420 gl_->Flush();
421 context_->SetSurfaceVisible(visible);
422 }
423
423 void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM( 424 void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM(
424 WebGLId texture, WebGLId parentTexture) { 425 WebGLId texture, WebGLId parentTexture) {
425 NOTIMPLEMENTED(); 426 NOTIMPLEMENTED();
426 } 427 }
427 428
428 void WebGraphicsContext3DCommandBufferImpl:: 429 void WebGraphicsContext3DCommandBufferImpl::
429 rateLimitOffscreenContextCHROMIUM() { 430 rateLimitOffscreenContextCHROMIUM() {
430 gl_->RateLimitOffscreenContextCHROMIUM(); 431 gl_->RateLimitOffscreenContextCHROMIUM();
431 } 432 }
432 433
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 if (context_lost_callback_) { 1146 if (context_lost_callback_) {
1146 context_lost_callback_->onContextLost(); 1147 context_lost_callback_->onContextLost();
1147 } 1148 }
1148 RenderViewImpl* renderview = 1149 RenderViewImpl* renderview =
1149 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; 1150 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL;
1150 if (renderview) 1151 if (renderview)
1151 renderview->OnViewContextSwapBuffersAborted(); 1152 renderview->OnViewContextSwapBuffersAborted();
1152 } 1153 }
1153 1154
1154 #endif // defined(ENABLE_GPU) 1155 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h ('k') | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698