| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 #include "platform/geometry/FloatSize.h" | 33 #include "platform/geometry/FloatSize.h" |
| 34 #include "platform/graphics/Color.h" | 34 #include "platform/graphics/Color.h" |
| 35 #include "platform/graphics/skia/SkiaUtils.h" | 35 #include "platform/graphics/skia/SkiaUtils.h" |
| 36 #include "third_party/skia/include/core/SkColor.h" | 36 #include "third_party/skia/include/core/SkColor.h" |
| 37 #include "third_party/skia/include/core/SkColorFilter.h" | 37 #include "third_party/skia/include/core/SkColorFilter.h" |
| 38 #include "third_party/skia/include/core/SkDrawLooper.h" | 38 #include "third_party/skia/include/core/SkDrawLooper.h" |
| 39 #include "third_party/skia/include/core/SkPaint.h" | 39 #include "third_party/skia/include/core/SkPaint.h" |
| 40 #include "third_party/skia/include/core/SkXfermode.h" | 40 #include "third_party/skia/include/core/SkXfermode.h" |
| 41 #include "third_party/skia/include/effects/SkBlurMaskFilter.h" | 41 #include "third_party/skia/include/effects/SkBlurMaskFilter.h" |
| 42 #include "wtf/PtrUtil.h" | |
| 43 #include "wtf/RefPtr.h" | 42 #include "wtf/RefPtr.h" |
| 44 #include <memory> | |
| 45 | 43 |
| 46 namespace blink { | 44 namespace blink { |
| 47 | 45 |
| 48 DrawLooperBuilder::DrawLooperBuilder() { } | 46 DrawLooperBuilder::DrawLooperBuilder() { } |
| 49 | 47 |
| 50 DrawLooperBuilder::~DrawLooperBuilder() { } | 48 DrawLooperBuilder::~DrawLooperBuilder() { } |
| 51 | 49 |
| 52 std::unique_ptr<DrawLooperBuilder> DrawLooperBuilder::create() | 50 PassOwnPtr<DrawLooperBuilder> DrawLooperBuilder::create() |
| 53 { | 51 { |
| 54 return wrapUnique(new DrawLooperBuilder); | 52 return adoptPtr(new DrawLooperBuilder); |
| 55 } | 53 } |
| 56 | 54 |
| 57 PassRefPtr<SkDrawLooper> DrawLooperBuilder::detachDrawLooper() | 55 PassRefPtr<SkDrawLooper> DrawLooperBuilder::detachDrawLooper() |
| 58 { | 56 { |
| 59 return fromSkSp(m_skDrawLooperBuilder.detach()); | 57 return fromSkSp(m_skDrawLooperBuilder.detach()); |
| 60 } | 58 } |
| 61 | 59 |
| 62 void DrawLooperBuilder::addUnmodifiedContent() | 60 void DrawLooperBuilder::addUnmodifiedContent() |
| 63 { | 61 { |
| 64 SkLayerDrawLooper::LayerInfo info; | 62 SkLayerDrawLooper::LayerInfo info; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 uint32_t mfFlags = SkBlurMaskFilter::kHighQuality_BlurFlag; | 100 uint32_t mfFlags = SkBlurMaskFilter::kHighQuality_BlurFlag; |
| 103 if (shadowTransformMode == ShadowIgnoresTransforms) | 101 if (shadowTransformMode == ShadowIgnoresTransforms) |
| 104 mfFlags |= SkBlurMaskFilter::kIgnoreTransform_BlurFlag; | 102 mfFlags |= SkBlurMaskFilter::kIgnoreTransform_BlurFlag; |
| 105 paint->setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma,
mfFlags)); | 103 paint->setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma,
mfFlags)); |
| 106 } | 104 } |
| 107 | 105 |
| 108 paint->setColorFilter(SkColorFilter::MakeModeFilter(skColor, SkXfermode::kSr
cIn_Mode)); | 106 paint->setColorFilter(SkColorFilter::MakeModeFilter(skColor, SkXfermode::kSr
cIn_Mode)); |
| 109 } | 107 } |
| 110 | 108 |
| 111 } // namespace blink | 109 } // namespace blink |
| OLD | NEW |