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 |
9 #include "SkScalar.h" | 9 #include "SkScalar.h" |
10 #include "SkShader.h" | 10 #include "SkShader.h" |
11 #include "SkFlattenableBuffers.h" | 11 #include "SkFlattenableBuffers.h" |
12 #include "SkPaint.h" | 12 #include "SkPaint.h" |
13 #include "SkMallocPixelRef.h" | 13 #include "SkMallocPixelRef.h" |
14 | 14 |
15 SK_DEFINE_INST_COUNT(SkShader) | |
16 | |
17 SkShader::SkShader() { | 15 SkShader::SkShader() { |
18 fLocalMatrix.reset(); | 16 fLocalMatrix.reset(); |
19 SkDEBUGCODE(fInSetContext = false;) | 17 SkDEBUGCODE(fInSetContext = false;) |
20 } | 18 } |
21 | 19 |
22 SkShader::SkShader(SkFlattenableReadBuffer& buffer) | 20 SkShader::SkShader(SkFlattenableReadBuffer& buffer) |
23 : INHERITED(buffer) { | 21 : INHERITED(buffer) { |
24 if (buffer.readBool()) { | 22 if (buffer.readBool()) { |
25 buffer.readMatrix(&fLocalMatrix); | 23 buffer.readMatrix(&fLocalMatrix); |
26 } else { | 24 } else { |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 350 |
353 #ifdef SK_DEVELOPER | 351 #ifdef SK_DEVELOPER |
354 void SkEmptyShader::toString(SkString* str) const { | 352 void SkEmptyShader::toString(SkString* str) const { |
355 str->append("SkEmptyShader: ("); | 353 str->append("SkEmptyShader: ("); |
356 | 354 |
357 this->INHERITED::toString(str); | 355 this->INHERITED::toString(str); |
358 | 356 |
359 str->append(")"); | 357 str->append(")"); |
360 } | 358 } |
361 #endif | 359 #endif |
OLD | NEW |