| 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 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2012 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE
RRIDE; | 2012 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE
RRIDE; |
| 2013 | 2013 |
| 2014 private: | 2014 private: |
| 2015 SkMatrix fDstToUnit; | 2015 SkMatrix fDstToUnit; |
| 2016 SkPMColor fColors[3]; | 2016 SkPMColor fColors[3]; |
| 2017 | 2017 |
| 2018 typedef SkShader::Context INHERITED; | 2018 typedef SkShader::Context INHERITED; |
| 2019 }; | 2019 }; |
| 2020 | 2020 |
| 2021 SK_TO_STRING_OVERRIDE() | 2021 SK_TO_STRING_OVERRIDE() |
| 2022 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTriColorShader) | 2022 SK_DECLARE_NOT_FLATTENABLE_PROCS(SkTriColorShader) |
| 2023 | 2023 |
| 2024 protected: | 2024 protected: |
| 2025 SkTriColorShader(SkReadBuffer& buffer) : SkShader(buffer) {} | |
| 2026 | |
| 2027 virtual Context* onCreateContext(const ContextRec& rec, void* storage) const
SK_OVERRIDE { | 2025 virtual Context* onCreateContext(const ContextRec& rec, void* storage) const
SK_OVERRIDE { |
| 2028 return SkNEW_PLACEMENT_ARGS(storage, TriColorShaderContext, (*this, rec)
); | 2026 return SkNEW_PLACEMENT_ARGS(storage, TriColorShaderContext, (*this, rec)
); |
| 2029 } | 2027 } |
| 2030 | 2028 |
| 2031 private: | 2029 private: |
| 2032 typedef SkShader INHERITED; | 2030 typedef SkShader INHERITED; |
| 2033 }; | 2031 }; |
| 2034 | 2032 |
| 2035 bool SkTriColorShader::TriColorShaderContext::setup(const SkPoint pts[], const S
kColor colors[], | 2033 bool SkTriColorShader::TriColorShaderContext::setup(const SkPoint pts[], const S
kColor colors[], |
| 2036 int index0, int index1, int
index2) { | 2034 int index0, int index1, int
index2) { |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 mask->fImage = SkMask::AllocImage(size); | 2373 mask->fImage = SkMask::AllocImage(size); |
| 2376 memset(mask->fImage, 0, mask->computeImageSize()); | 2374 memset(mask->fImage, 0, mask->computeImageSize()); |
| 2377 } | 2375 } |
| 2378 | 2376 |
| 2379 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2377 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
| 2380 draw_into_mask(*mask, devPath, style); | 2378 draw_into_mask(*mask, devPath, style); |
| 2381 } | 2379 } |
| 2382 | 2380 |
| 2383 return true; | 2381 return true; |
| 2384 } | 2382 } |
| OLD | NEW |