diff options
author | benjaminwagner <benjaminwagner@google.com> | 2015-10-19 13:55:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-19 13:55:55 -0700 |
commit | 7d974f5e4f8ded8834b58f560ac6e03aed370310 (patch) | |
tree | 7b35daa322d3fe65734f26126824e2173e59bdfd | |
parent | 423f6461e98ba28730d05e5894804a4970a09bde (diff) |
Modifications to get 'blaze build -c opt //third_party/skia/HEAD/...' to work.
BUG=skia:
Review URL: https://codereview.chromium.org/1413973002
-rw-r--r-- | BUILD.public | 1 | ||||
-rw-r--r-- | src/core/SkStream.cpp | 5 | ||||
-rw-r--r-- | src/core/SkTaskGroup.h | 5 | ||||
-rw-r--r-- | src/gpu/GrContext.cpp | 5 | ||||
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 5 | ||||
-rw-r--r-- | tests/MatrixTest.cpp | 6 | ||||
-rw-r--r-- | tests/SRGBReadWritePixelsTest.cpp | 6 |
7 files changed, 33 insertions, 0 deletions
diff --git a/BUILD.public b/BUILD.public index 832b3ad2ed..d806214f0e 100644 --- a/BUILD.public +++ b/BUILD.public @@ -219,6 +219,7 @@ DM_INCLUDES = [ COPTS = [ "-Wno-implicit-fallthrough", # Some intentional fallthrough. + "-Wno-deprecated-declarations", # Internal use of deprecated methods. :( ] DEFINES = [ diff --git a/src/core/SkStream.cpp b/src/core/SkStream.cpp index b834513b4f..20e2ae9652 100644 --- a/src/core/SkStream.cpp +++ b/src/core/SkStream.cpp @@ -892,7 +892,12 @@ size_t SkCopyStreamToStorage(SkAutoMalloc* storage, SkStream* stream) { SkDynamicMemoryWStream tempStream; // Arbitrary buffer size. +#if defined(GOOGLE3) + // Stack frame size is limited in GOOGLE3. + const size_t bufferSize = 8 * 1024; // 8KB +#else const size_t bufferSize = 256 * 1024; // 256KB +#endif char buffer[bufferSize]; SkDEBUGCODE(size_t debugLength = 0;) do { diff --git a/src/core/SkTaskGroup.h b/src/core/SkTaskGroup.h index 3af64d7753..76afe9d92f 100644 --- a/src/core/SkTaskGroup.h +++ b/src/core/SkTaskGroup.h @@ -69,8 +69,13 @@ void sk_parallel_for(int end, const Func& f) { nchunks = (end + stride - 1 ) / stride; SkASSERT(nchunks <= max_chunks); +#if defined(GOOGLE3) + // Stack frame size is limited in GOOGLE3. + SkAutoSTMalloc<512, Chunk> chunks(nchunks); +#else // With the chunking strategy above this won't malloc until we have a machine with >512 cores. SkAutoSTMalloc<1024, Chunk> chunks(nchunks); +#endif for (int i = 0; i < nchunks; i++) { Chunk& c = chunks[i]; diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index dfbe2fc46a..e5bbb8fd91 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -404,7 +404,12 @@ bool GrContext::writeSurfacePixels(GrSurface* surface, } // temp buffer for doing sw premul conversion, if needed. +#if defined(GOOGLE3) + // Stack frame size is limited in GOOGLE3. + SkAutoSTMalloc<48 * 48, uint32_t> tmpPixels(0); +#else SkAutoSTMalloc<128 * 128, uint32_t> tmpPixels(0); +#endif if (tempTexture) { SkAutoTUnref<const GrFragmentProcessor> fp; SkMatrix textureMatrix; diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 80f0171f57..7bbe932c71 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -625,7 +625,12 @@ bool GrGLGpu::uploadTexData(const GrSurfaceDesc& desc, size_t trimRowBytes = width * bpp; // in case we need a temporary, trimmed copy of the src pixels +#if defined(GOOGLE3) + // Stack frame size is limited in GOOGLE3. + SkAutoSMalloc<64 * 128> tempStorage; +#else SkAutoSMalloc<128 * 128> tempStorage; +#endif // We currently lazily create MIPMAPs when the we see a draw with // GrTextureParams::kMipMap_FilterMode. Using texture storage requires that the diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp index 57e79576b0..edeb649a66 100644 --- a/tests/MatrixTest.cpp +++ b/tests/MatrixTest.cpp @@ -664,8 +664,14 @@ static void test_matrix_homogeneous(skiatest::Reporter* reporter) { const float kRotation1 = -50.f; const float kScale0 = 5000.f; +#if defined(GOOGLE3) + // Stack frame size is limited in GOOGLE3. + const int kTripleCount = 100; + const int kMatrixCount = 100; +#else const int kTripleCount = 1000; const int kMatrixCount = 1000; +#endif SkRandom rand; SkScalar randTriples[3*kTripleCount]; diff --git a/tests/SRGBReadWritePixelsTest.cpp b/tests/SRGBReadWritePixelsTest.cpp index f0e747a400..7e0b721246 100644 --- a/tests/SRGBReadWritePixelsTest.cpp +++ b/tests/SRGBReadWritePixelsTest.cpp @@ -140,8 +140,14 @@ void read_and_check_pixels(skiatest::Reporter* reporter, GrTexture* texture, uin // TODO: Add tests for copySurface between srgb/linear textures. Add tests for unpremul/premul // conversion during read/write along with srgb/linear conversions. DEF_GPUTEST(SRGBReadWritePixels, reporter, factory) { +#if defined(GOOGLE3) + // Stack frame size is limited in GOOGLE3. + static const int kW = 63; + static const int kH = 63; +#else static const int kW = 255; static const int kH = 255; +#endif uint32_t origData[kW * kH]; for (int j = 0; j < kH; ++j) { for (int i = 0; i < kW; ++i) { |