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

Side by Side Diff: src/core/SkBitmapProcShader.cpp

Issue 197763008: Allow toString capability to be toggled independent of developer mode (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: remove gyp changes Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkBitmapProcShader.h ('k') | src/core/SkBlitter.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkColorPriv.h" 8 #include "SkColorPriv.h"
9 #include "SkReadBuffer.h" 9 #include "SkReadBuffer.h"
10 #include "SkWriteBuffer.h" 10 #include "SkWriteBuffer.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 shader = SkNEW_ARGS(SkBitmapProcShader, (src, tmx, tmy)); 326 shader = SkNEW_ARGS(SkBitmapProcShader, (src, tmx, tmy));
327 } else { 327 } else {
328 shader = allocator->createT<SkBitmapProcShader>(src, tmx, tmy); 328 shader = allocator->createT<SkBitmapProcShader>(src, tmx, tmy);
329 } 329 }
330 } 330 }
331 return shader; 331 return shader;
332 } 332 }
333 333
334 /////////////////////////////////////////////////////////////////////////////// 334 ///////////////////////////////////////////////////////////////////////////////
335 335
336 #ifdef SK_DEVELOPER 336 #ifndef SK_IGNORE_TO_STRING
337 void SkBitmapProcShader::toString(SkString* str) const { 337 void SkBitmapProcShader::toString(SkString* str) const {
338 static const char* gTileModeName[SkShader::kTileModeCount] = { 338 static const char* gTileModeName[SkShader::kTileModeCount] = {
339 "clamp", "repeat", "mirror" 339 "clamp", "repeat", "mirror"
340 }; 340 };
341 341
342 str->append("BitmapShader: ("); 342 str->append("BitmapShader: (");
343 343
344 str->appendf("(%s, %s)", 344 str->appendf("(%s, %s)",
345 gTileModeName[fState.fTileModeX], 345 gTileModeName[fState.fTileModeX],
346 gTileModeName[fState.fTileModeY]); 346 gTileModeName[fState.fTileModeY]);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 GrEffectRef* effect = NULL; 444 GrEffectRef* effect = NULL;
445 if (paintFilterLevel == SkPaint::kHigh_FilterLevel) { 445 if (paintFilterLevel == SkPaint::kHigh_FilterLevel) {
446 effect = GrBicubicEffect::Create(texture, matrix, tm); 446 effect = GrBicubicEffect::Create(texture, matrix, tm);
447 } else { 447 } else {
448 effect = GrSimpleTextureEffect::Create(texture, matrix, params); 448 effect = GrSimpleTextureEffect::Create(texture, matrix, params);
449 } 449 }
450 GrUnlockAndUnrefCachedBitmapTexture(texture); 450 GrUnlockAndUnrefCachedBitmapTexture(texture);
451 return effect; 451 return effect;
452 } 452 }
453 #endif 453 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcShader.h ('k') | src/core/SkBlitter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698