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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp

Issue 1667843003: Make Resource RefCountedWillBeGarbageCollectedFinalized, attempt #2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + address review comments Created 4 years, 10 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 StyleFetchedImageSet::~StyleFetchedImageSet() 48 StyleFetchedImageSet::~StyleFetchedImageSet()
49 { 49 {
50 #if !ENABLE(OILPAN) 50 #if !ENABLE(OILPAN)
51 dispose(); 51 dispose();
52 #endif 52 #endif
53 } 53 }
54 54
55 void StyleFetchedImageSet::dispose() 55 void StyleFetchedImageSet::dispose()
56 { 56 {
57 m_bestFitImage->removeClient(this); 57 m_bestFitImage->removeClient(this);
58 m_bestFitImage = nullptr;
58 } 59 }
59 60
60 WrappedImagePtr StyleFetchedImageSet::data() const 61 WrappedImagePtr StyleFetchedImageSet::data() const
61 { 62 {
62 return m_bestFitImage.get(); 63 return m_bestFitImage.get();
63 } 64 }
64 65
65 ImageResource* StyleFetchedImageSet::cachedImage() const 66 ImageResource* StyleFetchedImageSet::cachedImage() const
66 { 67 {
67 return m_bestFitImage.get(); 68 return m_bestFitImage.get();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 134 }
134 135
135 bool StyleFetchedImageSet::knownToBeOpaque(const LayoutObject* layoutObject) con st 136 bool StyleFetchedImageSet::knownToBeOpaque(const LayoutObject* layoutObject) con st
136 { 137 {
137 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data", InspectorPaintImageEvent::data(layoutObject, *m_bestFitImage.get())); 138 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data", InspectorPaintImageEvent::data(layoutObject, *m_bestFitImage.get()));
138 return m_bestFitImage->image()->currentFrameKnownToBeOpaque(Image::PreCacheM etadata); 139 return m_bestFitImage->image()->currentFrameKnownToBeOpaque(Image::PreCacheM etadata);
139 } 140 }
140 141
141 DEFINE_TRACE(StyleFetchedImageSet) 142 DEFINE_TRACE(StyleFetchedImageSet)
142 { 143 {
144 visitor->trace(m_bestFitImage);
143 visitor->trace(m_imageSetValue); 145 visitor->trace(m_imageSetValue);
144 StyleImage::trace(visitor); 146 StyleImage::trace(visitor);
145 } 147 }
146 148
147 } // namespace blink 149 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleFetchedImageSet.h ('k') | third_party/WebKit/Source/core/svg/SVGFEImageElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698