| 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 "SkDraw.h" | 8 #include "SkDraw.h" |
| 9 #include "SkBlitter.h" | 9 #include "SkBlitter.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2028 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE
RRIDE; | 2028 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE
RRIDE; |
| 2029 | 2029 |
| 2030 private: | 2030 private: |
| 2031 SkMatrix fDstToUnit; | 2031 SkMatrix fDstToUnit; |
| 2032 SkPMColor fColors[3]; | 2032 SkPMColor fColors[3]; |
| 2033 | 2033 |
| 2034 typedef SkShader::Context INHERITED; | 2034 typedef SkShader::Context INHERITED; |
| 2035 }; | 2035 }; |
| 2036 | 2036 |
| 2037 SK_TO_STRING_OVERRIDE() | 2037 SK_TO_STRING_OVERRIDE() |
| 2038 SK_DECLARE_NOT_FLATTENABLE_PROCS(SkTriColorShader) | 2038 |
| 2039 // For serialization. This will never be called. |
| 2040 Factory getFactory() const SK_OVERRIDE { sk_throw(); return NULL; } |
| 2039 | 2041 |
| 2040 protected: | 2042 protected: |
| 2041 virtual Context* onCreateContext(const ContextRec& rec, void* storage) const
SK_OVERRIDE { | 2043 virtual Context* onCreateContext(const ContextRec& rec, void* storage) const
SK_OVERRIDE { |
| 2042 return SkNEW_PLACEMENT_ARGS(storage, TriColorShaderContext, (*this, rec)
); | 2044 return SkNEW_PLACEMENT_ARGS(storage, TriColorShaderContext, (*this, rec)
); |
| 2043 } | 2045 } |
| 2044 | 2046 |
| 2045 private: | 2047 private: |
| 2046 typedef SkShader INHERITED; | 2048 typedef SkShader INHERITED; |
| 2047 }; | 2049 }; |
| 2048 | 2050 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2389 mask->fImage = SkMask::AllocImage(size); | 2391 mask->fImage = SkMask::AllocImage(size); |
| 2390 memset(mask->fImage, 0, mask->computeImageSize()); | 2392 memset(mask->fImage, 0, mask->computeImageSize()); |
| 2391 } | 2393 } |
| 2392 | 2394 |
| 2393 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2395 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
| 2394 draw_into_mask(*mask, devPath, style); | 2396 draw_into_mask(*mask, devPath, style); |
| 2395 } | 2397 } |
| 2396 | 2398 |
| 2397 return true; | 2399 return true; |
| 2398 } | 2400 } |
| OLD | NEW |