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

Unified Diff: Source/core/fetch/ImageResource.cpp

Issue 23083003: Make brokenImage() a static member of ImageResource class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaselined patch Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fetch/ImageResource.h ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ImageResource.cpp
diff --git a/Source/core/fetch/ImageResource.cpp b/Source/core/fetch/ImageResource.cpp
index 2a735e15352170d24c8dd6842e99fcd78cce57d7..f0e5d38b1a83e699f51edae8cd9076a55df05336 100644
--- a/Source/core/fetch/ImageResource.cpp
+++ b/Source/core/fetch/ImageResource.cpp
@@ -127,15 +127,15 @@ void ImageResource::allClientsRemoved()
Resource::allClientsRemoved();
}
-pair<WebCore::Image*, float> ImageResource::brokenImage(float deviceScaleFactor) const
+pair<WebCore::Image*, float> ImageResource::brokenImage(float deviceScaleFactor)
{
if (deviceScaleFactor >= 2) {
- DEFINE_STATIC_LOCAL(WebCore::Image*, brokenImageHiRes, (WebCore::Image::loadPlatformResource("missingImage@2x").leakRef()));
- return std::make_pair(brokenImageHiRes, 2);
+ DEFINE_STATIC_LOCAL(RefPtr<WebCore::Image>, brokenImageHiRes, (WebCore::Image::loadPlatformResource("missingImage@2x")));
+ return std::make_pair(brokenImageHiRes.get(), 2);
}
- DEFINE_STATIC_LOCAL(WebCore::Image*, brokenImageLoRes, (WebCore::Image::loadPlatformResource("missingImage").leakRef()));
- return std::make_pair(brokenImageLoRes, 1);
+ DEFINE_STATIC_LOCAL(RefPtr<WebCore::Image>, brokenImageLoRes, (WebCore::Image::loadPlatformResource("missingImage")));
+ return std::make_pair(brokenImageLoRes.get(), 1);
}
bool ImageResource::willPaintBrokenImage() const
« no previous file with comments | « Source/core/fetch/ImageResource.h ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698