| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 "SkBitmapProcShader.h" | 8 #include "SkBitmapProcShader.h" |
| 9 #include "SkReadBuffer.h" | 9 #include "SkReadBuffer.h" |
| 10 #include "SkMallocPixelRef.h" | 10 #include "SkMallocPixelRef.h" |
| 11 #include "SkPaint.h" | 11 #include "SkPaint.h" |
| 12 #include "SkPicture.h" | |
| 13 #include "SkPictureShader.h" | |
| 14 #include "SkScalar.h" | 12 #include "SkScalar.h" |
| 15 #include "SkShader.h" | 13 #include "SkShader.h" |
| 16 #include "SkWriteBuffer.h" | 14 #include "SkWriteBuffer.h" |
| 17 | 15 |
| 18 SkShader::SkShader() { | 16 SkShader::SkShader() { |
| 19 fLocalMatrix.reset(); | 17 fLocalMatrix.reset(); |
| 20 SkDEBUGCODE(fInSetContext = false;) | 18 SkDEBUGCODE(fInSetContext = false;) |
| 21 } | 19 } |
| 22 | 20 |
| 23 SkShader::SkShader(SkReadBuffer& buffer) | 21 SkShader::SkShader(SkReadBuffer& buffer) |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 172 |
| 175 GrEffectRef* SkShader::asNewEffect(GrContext*, const SkPaint&) const { | 173 GrEffectRef* SkShader::asNewEffect(GrContext*, const SkPaint&) const { |
| 176 return NULL; | 174 return NULL; |
| 177 } | 175 } |
| 178 | 176 |
| 179 SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, | 177 SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, |
| 180 TileMode tmx, TileMode tmy) { | 178 TileMode tmx, TileMode tmy) { |
| 181 return ::CreateBitmapShader(src, tmx, tmy, NULL); | 179 return ::CreateBitmapShader(src, tmx, tmy, NULL); |
| 182 } | 180 } |
| 183 | 181 |
| 184 SkShader* SkShader::CreatePictureShader(SkPicture* src, TileMode tmx, TileMode t
my) { | |
| 185 return SkPictureShader::Create(src, tmx, tmy); | |
| 186 } | |
| 187 | |
| 188 #ifndef SK_IGNORE_TO_STRING | 182 #ifndef SK_IGNORE_TO_STRING |
| 189 void SkShader::toString(SkString* str) const { | 183 void SkShader::toString(SkString* str) const { |
| 190 if (this->hasLocalMatrix()) { | 184 if (this->hasLocalMatrix()) { |
| 191 str->append(" "); | 185 str->append(" "); |
| 192 this->getLocalMatrix().toString(str); | 186 this->getLocalMatrix().toString(str); |
| 193 } | 187 } |
| 194 } | 188 } |
| 195 #endif | 189 #endif |
| 196 | 190 |
| 197 ////////////////////////////////////////////////////////////////////////////// | 191 ////////////////////////////////////////////////////////////////////////////// |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 | 350 |
| 357 #ifndef SK_IGNORE_TO_STRING | 351 #ifndef SK_IGNORE_TO_STRING |
| 358 void SkEmptyShader::toString(SkString* str) const { | 352 void SkEmptyShader::toString(SkString* str) const { |
| 359 str->append("SkEmptyShader: ("); | 353 str->append("SkEmptyShader: ("); |
| 360 | 354 |
| 361 this->INHERITED::toString(str); | 355 this->INHERITED::toString(str); |
| 362 | 356 |
| 363 str->append(")"); | 357 str->append(")"); |
| 364 } | 358 } |
| 365 #endif | 359 #endif |
| OLD | NEW |