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

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

Issue 1666203002: Move Google3-specific stack limitation logic to template classes. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fix GLPtr(Alias). Created 4 years, 10 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 | « src/gpu/batches/GrDrawPathBatch.cpp ('k') | 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
9 #include "GrGLGpu.h" 8 #include "GrGLGpu.h"
10 #include "GrGLGLSL.h" 9 #include "GrGLGLSL.h"
11 #include "GrGLStencilAttachment.h" 10 #include "GrGLStencilAttachment.h"
12 #include "GrGLTextureRenderTarget.h" 11 #include "GrGLTextureRenderTarget.h"
13 #include "GrGpuResourcePriv.h" 12 #include "GrGpuResourcePriv.h"
14 #include "GrPipeline.h" 13 #include "GrPipeline.h"
15 #include "GrPLSGeometryProcessor.h" 14 #include "GrPLSGeometryProcessor.h"
16 #include "GrRenderTargetPriv.h" 15 #include "GrRenderTargetPriv.h"
17 #include "GrSurfacePriv.h" 16 #include "GrSurfacePriv.h"
18 #include "GrTexturePriv.h" 17 #include "GrTexturePriv.h"
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 SkASSERT(this->caps()->isConfigTexturable(desc.fConfig)); 849 SkASSERT(this->caps()->isConfigTexturable(desc.fConfig));
851 850
852 size_t bpp = GrBytesPerPixel(dataConfig); 851 size_t bpp = GrBytesPerPixel(dataConfig);
853 if (!GrSurfacePriv::AdjustWritePixelParams(desc.fWidth, desc.fHeight, bpp, & left, &top, 852 if (!GrSurfacePriv::AdjustWritePixelParams(desc.fWidth, desc.fHeight, bpp, & left, &top,
854 &width, &height, &dataOrOffset, & rowBytes)) { 853 &width, &height, &dataOrOffset, & rowBytes)) {
855 return false; 854 return false;
856 } 855 }
857 size_t trimRowBytes = width * bpp; 856 size_t trimRowBytes = width * bpp;
858 857
859 // in case we need a temporary, trimmed copy of the src pixels 858 // in case we need a temporary, trimmed copy of the src pixels
860 #if defined(GOOGLE3)
861 // Stack frame size is limited in GOOGLE3.
862 SkAutoSMalloc<64 * 128> tempStorage;
863 #else
864 SkAutoSMalloc<128 * 128> tempStorage; 859 SkAutoSMalloc<128 * 128> tempStorage;
865 #endif
866 860
867 // Internal format comes from the texture desc. 861 // Internal format comes from the texture desc.
868 GrGLenum internalFormat; 862 GrGLenum internalFormat;
869 // External format and type come from the upload data. 863 // External format and type come from the upload data.
870 GrGLenum externalFormat; 864 GrGLenum externalFormat;
871 GrGLenum externalType; 865 GrGLenum externalType;
872 if (!this->glCaps().getTexImageFormats(desc.fConfig, dataConfig, &internalFo rmat, 866 if (!this->glCaps().getTexImageFormats(desc.fConfig, dataConfig, &internalFo rmat,
873 &externalFormat, &externalType)) { 867 &externalFormat, &externalType)) {
874 return false; 868 return false;
875 } 869 }
(...skipping 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after
3824 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 3818 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
3825 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 3819 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
3826 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 3820 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
3827 copyParams->fWidth = texture->width(); 3821 copyParams->fWidth = texture->width();
3828 copyParams->fHeight = texture->height(); 3822 copyParams->fHeight = texture->height();
3829 return true; 3823 return true;
3830 } 3824 }
3831 } 3825 }
3832 return false; 3826 return false;
3833 } 3827 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698