Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/DrawLooperBuilder.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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"
42 #include "wtf/RefPtr.h" 43 #include "wtf/RefPtr.h"
44 #include <memory>
43 45
44 namespace blink { 46 namespace blink {
45 47
46 DrawLooperBuilder::DrawLooperBuilder() { } 48 DrawLooperBuilder::DrawLooperBuilder() { }
47 49
48 DrawLooperBuilder::~DrawLooperBuilder() { } 50 DrawLooperBuilder::~DrawLooperBuilder() { }
49 51
50 PassOwnPtr<DrawLooperBuilder> DrawLooperBuilder::create() 52 std::unique_ptr<DrawLooperBuilder> DrawLooperBuilder::create()
51 { 53 {
52 return adoptPtr(new DrawLooperBuilder); 54 return wrapUnique(new DrawLooperBuilder);
53 } 55 }
54 56
55 PassRefPtr<SkDrawLooper> DrawLooperBuilder::detachDrawLooper() 57 PassRefPtr<SkDrawLooper> DrawLooperBuilder::detachDrawLooper()
56 { 58 {
57 return fromSkSp(m_skDrawLooperBuilder.detach()); 59 return fromSkSp(m_skDrawLooperBuilder.detach());
58 } 60 }
59 61
60 void DrawLooperBuilder::addUnmodifiedContent() 62 void DrawLooperBuilder::addUnmodifiedContent()
61 { 63 {
62 SkLayerDrawLooper::LayerInfo info; 64 SkLayerDrawLooper::LayerInfo info;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 uint32_t mfFlags = SkBlurMaskFilter::kHighQuality_BlurFlag; 102 uint32_t mfFlags = SkBlurMaskFilter::kHighQuality_BlurFlag;
101 if (shadowTransformMode == ShadowIgnoresTransforms) 103 if (shadowTransformMode == ShadowIgnoresTransforms)
102 mfFlags |= SkBlurMaskFilter::kIgnoreTransform_BlurFlag; 104 mfFlags |= SkBlurMaskFilter::kIgnoreTransform_BlurFlag;
103 paint->setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma, mfFlags)); 105 paint->setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma, mfFlags));
104 } 106 }
105 107
106 paint->setColorFilter(SkColorFilter::MakeModeFilter(skColor, SkXfermode::kSr cIn_Mode)); 108 paint->setColorFilter(SkColorFilter::MakeModeFilter(skColor, SkXfermode::kSr cIn_Mode));
107 } 109 }
108 110
109 } // namespace blink 111 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698