OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |