OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 DrawLooperBuilder::DrawLooperBuilder() { } | 48 DrawLooperBuilder::DrawLooperBuilder() { } |
49 | 49 |
50 DrawLooperBuilder::~DrawLooperBuilder() { } | 50 DrawLooperBuilder::~DrawLooperBuilder() { } |
51 | 51 |
52 std::unique_ptr<DrawLooperBuilder> DrawLooperBuilder::create() | 52 std::unique_ptr<DrawLooperBuilder> DrawLooperBuilder::create() |
53 { | 53 { |
54 return wrapUnique(new DrawLooperBuilder); | 54 return wrapUnique(new DrawLooperBuilder); |
55 } | 55 } |
56 | 56 |
57 PassRefPtr<SkDrawLooper> DrawLooperBuilder::detachDrawLooper() | 57 sk_sp<SkDrawLooper> DrawLooperBuilder::detachDrawLooper() |
58 { | 58 { |
59 return fromSkSp(m_skDrawLooperBuilder.detach()); | 59 return m_skDrawLooperBuilder.detach(); |
60 } | 60 } |
61 | 61 |
62 void DrawLooperBuilder::addUnmodifiedContent() | 62 void DrawLooperBuilder::addUnmodifiedContent() |
63 { | 63 { |
64 SkLayerDrawLooper::LayerInfo info; | 64 SkLayerDrawLooper::LayerInfo info; |
65 m_skDrawLooperBuilder.addLayerOnTop(info); | 65 m_skDrawLooperBuilder.addLayerOnTop(info); |
66 } | 66 } |
67 | 67 |
68 void DrawLooperBuilder::addShadow(const FloatSize& offset, float blur, const Col
or& color, | 68 void DrawLooperBuilder::addShadow(const FloatSize& offset, float blur, const Col
or& color, |
69 ShadowTransformMode shadowTransformMode, ShadowAlphaMode shadowAlphaMode) | 69 ShadowTransformMode shadowTransformMode, ShadowAlphaMode shadowAlphaMode) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 uint32_t mfFlags = SkBlurMaskFilter::kHighQuality_BlurFlag; | 102 uint32_t mfFlags = SkBlurMaskFilter::kHighQuality_BlurFlag; |
103 if (shadowTransformMode == ShadowIgnoresTransforms) | 103 if (shadowTransformMode == ShadowIgnoresTransforms) |
104 mfFlags |= SkBlurMaskFilter::kIgnoreTransform_BlurFlag; | 104 mfFlags |= SkBlurMaskFilter::kIgnoreTransform_BlurFlag; |
105 paint->setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma,
mfFlags)); | 105 paint->setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma,
mfFlags)); |
106 } | 106 } |
107 | 107 |
108 paint->setColorFilter(SkColorFilter::MakeModeFilter(skColor, SkXfermode::kSr
cIn_Mode)); | 108 paint->setColorFilter(SkColorFilter::MakeModeFilter(skColor, SkXfermode::kSr
cIn_Mode)); |
109 } | 109 } |
110 | 110 |
111 } // namespace blink | 111 } // namespace blink |
OLD | NEW |