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

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

Issue 1536113003: Oilpan: prefinalize StyleFetchedImage* image resource clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleFetchedImageSet.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 23 matching lines...) Expand all
34 namespace blink { 34 namespace blink {
35 35
36 StyleFetchedImageSet::StyleFetchedImageSet(ImageResource* image, float imageScal eFactor, CSSImageSetValue* value, const KURL& url) 36 StyleFetchedImageSet::StyleFetchedImageSet(ImageResource* image, float imageScal eFactor, CSSImageSetValue* value, const KURL& url)
37 : m_bestFitImage(image) 37 : m_bestFitImage(image)
38 , m_imageScaleFactor(imageScaleFactor) 38 , m_imageScaleFactor(imageScaleFactor)
39 , m_imageSetValue(value) 39 , m_imageSetValue(value)
40 , m_url(url) 40 , m_url(url)
41 { 41 {
42 m_isImageResourceSet = true; 42 m_isImageResourceSet = true;
43 m_bestFitImage->addClient(this); 43 m_bestFitImage->addClient(this);
44 #if ENABLE(OILPAN)
45 ThreadState::current()->registerPreFinalizer(this);
46 #endif
44 } 47 }
45 48
49 StyleFetchedImageSet::~StyleFetchedImageSet()
50 {
51 #if !ENABLE(OILPAN)
52 dispose();
53 #endif
54 }
46 55
47 StyleFetchedImageSet::~StyleFetchedImageSet() 56 void StyleFetchedImageSet::dispose()
48 { 57 {
49 m_bestFitImage->removeClient(this); 58 m_bestFitImage->removeClient(this);
50 } 59 }
51 60
52 WrappedImagePtr StyleFetchedImageSet::data() const 61 WrappedImagePtr StyleFetchedImageSet::data() const
53 { 62 {
54 return m_bestFitImage.get(); 63 return m_bestFitImage.get();
55 } 64 }
56 65
57 ImageResource* StyleFetchedImageSet::cachedImage() const 66 ImageResource* StyleFetchedImageSet::cachedImage() const
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 return m_bestFitImage->image()->currentFrameKnownToBeOpaque(Image::PreCacheM etadata); 144 return m_bestFitImage->image()->currentFrameKnownToBeOpaque(Image::PreCacheM etadata);
136 } 145 }
137 146
138 DEFINE_TRACE(StyleFetchedImageSet) 147 DEFINE_TRACE(StyleFetchedImageSet)
139 { 148 {
140 visitor->trace(m_imageSetValue); 149 visitor->trace(m_imageSetValue);
141 StyleImage::trace(visitor); 150 StyleImage::trace(visitor);
142 } 151 }
143 152
144 } // namespace blink 153 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleFetchedImageSet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698