COPTS = [
"-Wno-implicit-fallthrough", # Some intentional fallthrough.
+ "-Wno-deprecated-declarations", # Internal use of deprecated methods. :(
]
DEFINES = [
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 {
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];
}
// 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;
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
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];
// 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) {