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

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

Issue 2082393002: Tab -> spaces (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLGpu.h" 8 #include "GrGLGpu.h"
9 #include "GrGLBuffer.h" 9 #include "GrGLBuffer.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 3570 matching lines...) Expand 10 before | Expand all | Expand 10 after
3581 return false; 3581 return false;
3582 } 3582 }
3583 3583
3584 // We look for opportunities to use CopyTexSubImage, or fbo blit. If neither are 3584 // We look for opportunities to use CopyTexSubImage, or fbo blit. If neither are
3585 // possible and we return false to fallback to creating a render target dst for render-to- 3585 // possible and we return false to fallback to creating a render target dst for render-to-
3586 // texture. This code prefers CopyTexSubImage to fbo blit and avoids trigger ing temporary fbo 3586 // texture. This code prefers CopyTexSubImage to fbo blit and avoids trigger ing temporary fbo
3587 // creation. It isn't clear that avoiding temporary fbo creation is actually optimal. 3587 // creation. It isn't clear that avoiding temporary fbo creation is actually optimal.
3588 3588
3589 GrSurfaceOrigin originForBlitFramebuffer = kDefault_GrSurfaceOrigin; 3589 GrSurfaceOrigin originForBlitFramebuffer = kDefault_GrSurfaceOrigin;
3590 if (this->glCaps().blitFramebufferSupport() == 3590 if (this->glCaps().blitFramebufferSupport() ==
3591 » GrGLCaps::kNoScalingNoMirroring_BlitFramebufferSupport) { 3591 GrGLCaps::kNoScalingNoMirroring_BlitFramebufferSupport) {
3592 originForBlitFramebuffer = src->origin(); 3592 originForBlitFramebuffer = src->origin();
3593 } 3593 }
3594 3594
3595 // Check for format issues with glCopyTexSubImage2D 3595 // Check for format issues with glCopyTexSubImage2D
3596 if (kGLES_GrGLStandard == this->glStandard() && this->glCaps().bgraIsInterna lFormat() && 3596 if (kGLES_GrGLStandard == this->glStandard() && this->glCaps().bgraIsInterna lFormat() &&
3597 kBGRA_8888_GrPixelConfig == src->config()) { 3597 kBGRA_8888_GrPixelConfig == src->config()) {
3598 // glCopyTexSubImage2D doesn't work with this config. If the bgra can be used with fbo blit 3598 // glCopyTexSubImage2D doesn't work with this config. If the bgra can be used with fbo blit
3599 // then we set up for that, otherwise fail. 3599 // then we set up for that, otherwise fail.
3600 if (this->caps()->isConfigRenderable(kBGRA_8888_GrPixelConfig, false)) { 3600 if (this->caps()->isConfigRenderable(kBGRA_8888_GrPixelConfig, false)) {
3601 desc->fOrigin = originForBlitFramebuffer; 3601 desc->fOrigin = originForBlitFramebuffer;
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
4647 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4647 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4648 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4648 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4649 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4649 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4650 copyParams->fWidth = texture->width(); 4650 copyParams->fWidth = texture->width();
4651 copyParams->fHeight = texture->height(); 4651 copyParams->fHeight = texture->height();
4652 return true; 4652 return true;
4653 } 4653 }
4654 } 4654 }
4655 return false; 4655 return false;
4656 } 4656 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698