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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h

Issue 2572423002: [SPv2] Use PassRefPtr in PropertyTreeState setter and remove meaningless DCHECK (Closed)
Patch Set: PassRefPtr<T> ---> RefPtr<T>&& Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
index 0204844235482c817b3b3089078fd63d1a110951..09a87c12fb00a83abc06d835ff76501cf59f054c 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
@@ -38,36 +38,30 @@ class PropertyTreeState {
DCHECK(!m_transform || !m_transform->hasOneRef());
return m_transform.get();
}
- void setTransform(const TransformPaintPropertyNode* node) {
+ void setTransform(RefPtr<const TransformPaintPropertyNode>&& node) {
jbroman 2016/12/15 15:35:49 Prefer RefPtr<T> as the argument, and std::move to
m_transform = node;
- DCHECK(!node->hasOneRef());
}
const ClipPaintPropertyNode* clip() const {
DCHECK(!m_clip || !m_clip->hasOneRef());
return m_clip.get();
}
- void setClip(const ClipPaintPropertyNode* node) {
- m_clip = node;
- DCHECK(!node->hasOneRef());
- }
+ void setClip(RefPtr<const ClipPaintPropertyNode>&& node) { m_clip = node; }
const EffectPaintPropertyNode* effect() const {
DCHECK(!m_effect || !m_effect->hasOneRef());
return m_effect.get();
}
- void setEffect(const EffectPaintPropertyNode* node) {
+ void setEffect(RefPtr<const EffectPaintPropertyNode>&& node) {
m_effect = node;
- DCHECK(!node->hasOneRef());
}
const ScrollPaintPropertyNode* scroll() const {
DCHECK(!m_scroll || !m_scroll->hasOneRef());
return m_scroll.get();
}
- void setScroll(const ScrollPaintPropertyNode* node) {
+ void setScroll(RefPtr<const ScrollPaintPropertyNode>&& node) {
m_scroll = node;
- DCHECK(!node->hasOneRef());
}
private:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698