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 | 8 #include "SkBitmapProcShader.h" |
| 9 #include "SkReadBuffer.h" |
| 10 #include "SkMallocPixelRef.h" |
| 11 #include "SkPaint.h" |
9 #include "SkScalar.h" | 12 #include "SkScalar.h" |
10 #include "SkShader.h" | 13 #include "SkShader.h" |
11 #include "SkReadBuffer.h" | |
12 #include "SkWriteBuffer.h" | 14 #include "SkWriteBuffer.h" |
13 #include "SkPaint.h" | |
14 #include "SkMallocPixelRef.h" | |
15 | 15 |
16 SkShader::SkShader() { | 16 SkShader::SkShader() { |
17 fLocalMatrix.reset(); | 17 fLocalMatrix.reset(); |
18 SkDEBUGCODE(fInSetContext = false;) | 18 SkDEBUGCODE(fInSetContext = false;) |
19 } | 19 } |
20 | 20 |
21 SkShader::SkShader(SkReadBuffer& buffer) | 21 SkShader::SkShader(SkReadBuffer& buffer) |
22 : INHERITED(buffer) { | 22 : INHERITED(buffer) { |
23 if (buffer.readBool()) { | 23 if (buffer.readBool()) { |
24 buffer.readMatrix(&fLocalMatrix); | 24 buffer.readMatrix(&fLocalMatrix); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 SkShader::GradientType SkShader::asAGradient(GradientInfo* info) const { | 169 SkShader::GradientType SkShader::asAGradient(GradientInfo* info) const { |
170 return kNone_GradientType; | 170 return kNone_GradientType; |
171 } | 171 } |
172 | 172 |
173 GrEffectRef* SkShader::asNewEffect(GrContext*, const SkPaint&) const { | 173 GrEffectRef* SkShader::asNewEffect(GrContext*, const SkPaint&) const { |
174 return NULL; | 174 return NULL; |
175 } | 175 } |
176 | 176 |
177 SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, | 177 SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, |
178 TileMode tmx, TileMode tmy) { | 178 TileMode tmx, TileMode tmy) { |
179 return SkShader::CreateBitmapShader(src, tmx, tmy, NULL, 0); | 179 return ::CreateBitmapShader(src, tmx, tmy, NULL); |
180 } | 180 } |
181 | 181 |
182 #ifdef SK_DEVELOPER | 182 #ifdef SK_DEVELOPER |
183 void SkShader::toString(SkString* str) const { | 183 void SkShader::toString(SkString* str) const { |
184 if (this->hasLocalMatrix()) { | 184 if (this->hasLocalMatrix()) { |
185 str->append(" "); | 185 str->append(" "); |
186 this->getLocalMatrix().toString(str); | 186 this->getLocalMatrix().toString(str); |
187 } | 187 } |
188 } | 188 } |
189 #endif | 189 #endif |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 350 |
351 #ifdef SK_DEVELOPER | 351 #ifdef SK_DEVELOPER |
352 void SkEmptyShader::toString(SkString* str) const { | 352 void SkEmptyShader::toString(SkString* str) const { |
353 str->append("SkEmptyShader: ("); | 353 str->append("SkEmptyShader: ("); |
354 | 354 |
355 this->INHERITED::toString(str); | 355 this->INHERITED::toString(str); |
356 | 356 |
357 str->append(")"); | 357 str->append(")"); |
358 } | 358 } |
359 #endif | 359 #endif |
OLD | NEW |