Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <functional> | |
|
mtklein
2016/02/04 19:16:05
// TODO: wtf?
We still don't think this explains
dogben
2016/02/04 19:23:39
There is an implicit conversion from lambda to std
mtklein
2016/02/04 19:48:30
Ah! What's the path for getting <functional> incl
| |
| 8 | 9 |
| 9 #include "GrGLGpu.h" | 10 #include "GrGLGpu.h" |
| 10 #include "GrGLGLSL.h" | 11 #include "GrGLGLSL.h" |
| 11 #include "GrGLStencilAttachment.h" | 12 #include "GrGLStencilAttachment.h" |
| 12 #include "GrGLTextureRenderTarget.h" | 13 #include "GrGLTextureRenderTarget.h" |
| 13 #include "GrGpuResourcePriv.h" | 14 #include "GrGpuResourcePriv.h" |
| 14 #include "GrPipeline.h" | 15 #include "GrPipeline.h" |
| 15 #include "GrPLSGeometryProcessor.h" | 16 #include "GrPLSGeometryProcessor.h" |
| 16 #include "GrRenderTargetPriv.h" | 17 #include "GrRenderTargetPriv.h" |
| 17 #include "GrSurfacePriv.h" | 18 #include "GrSurfacePriv.h" |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 850 SkASSERT(this->caps()->isConfigTexturable(desc.fConfig)); | 851 SkASSERT(this->caps()->isConfigTexturable(desc.fConfig)); |
| 851 | 852 |
| 852 size_t bpp = GrBytesPerPixel(dataConfig); | 853 size_t bpp = GrBytesPerPixel(dataConfig); |
| 853 if (!GrSurfacePriv::AdjustWritePixelParams(desc.fWidth, desc.fHeight, bpp, & left, &top, | 854 if (!GrSurfacePriv::AdjustWritePixelParams(desc.fWidth, desc.fHeight, bpp, & left, &top, |
| 854 &width, &height, &dataOrOffset, & rowBytes)) { | 855 &width, &height, &dataOrOffset, & rowBytes)) { |
| 855 return false; | 856 return false; |
| 856 } | 857 } |
| 857 size_t trimRowBytes = width * bpp; | 858 size_t trimRowBytes = width * bpp; |
| 858 | 859 |
| 859 // in case we need a temporary, trimmed copy of the src pixels | 860 // 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; | 861 SkAutoSMalloc<128 * 128> tempStorage; |
| 865 #endif | |
| 866 | 862 |
| 867 // Internal format comes from the texture desc. | 863 // Internal format comes from the texture desc. |
| 868 GrGLenum internalFormat; | 864 GrGLenum internalFormat; |
| 869 // External format and type come from the upload data. | 865 // External format and type come from the upload data. |
| 870 GrGLenum externalFormat; | 866 GrGLenum externalFormat; |
| 871 GrGLenum externalType; | 867 GrGLenum externalType; |
| 872 if (!this->glCaps().getTexImageFormats(desc.fConfig, dataConfig, &internalFo rmat, | 868 if (!this->glCaps().getTexImageFormats(desc.fConfig, dataConfig, &internalFo rmat, |
| 873 &externalFormat, &externalType)) { | 869 &externalFormat, &externalType)) { |
| 874 return false; | 870 return false; |
| 875 } | 871 } |
| (...skipping 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3824 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || | 3820 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || |
| 3825 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { | 3821 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { |
| 3826 copyParams->fFilter = GrTextureParams::kNone_FilterMode; | 3822 copyParams->fFilter = GrTextureParams::kNone_FilterMode; |
| 3827 copyParams->fWidth = texture->width(); | 3823 copyParams->fWidth = texture->width(); |
| 3828 copyParams->fHeight = texture->height(); | 3824 copyParams->fHeight = texture->height(); |
| 3829 return true; | 3825 return true; |
| 3830 } | 3826 } |
| 3831 } | 3827 } |
| 3832 return false; | 3828 return false; |
| 3833 } | 3829 } |
| OLD | NEW |