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

Unified Diff: sky/engine/core/fetch/ImageResource.cpp

Issue 776743002: Make v8 inspector not crash (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 | « sky/engine/core/fetch/ImageResource.h ('k') | sky/engine/platform/graphics/Image.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/fetch/ImageResource.cpp
diff --git a/sky/engine/core/fetch/ImageResource.cpp b/sky/engine/core/fetch/ImageResource.cpp
index 3488063d5c8a9042906e56854452b2fe3f0da8ae..834820dfade967d4ba318219aaeb9b7c472dd9a7 100644
--- a/sky/engine/core/fetch/ImageResource.cpp
+++ b/sky/engine/core/fetch/ImageResource.cpp
@@ -155,28 +155,10 @@ void ImageResource::allClientsRemoved()
Resource::allClientsRemoved();
}
-pair<blink::Image*, float> ImageResource::brokenImage(float deviceScaleFactor)
-{
- if (deviceScaleFactor >= 2) {
- DEFINE_STATIC_REF(blink::Image, brokenImageHiRes, (blink::Image::loadPlatformResource("missingImage@2x")));
- return std::make_pair(brokenImageHiRes, 2);
- }
-
- DEFINE_STATIC_REF(blink::Image, brokenImageLoRes, (blink::Image::loadPlatformResource("missingImage")));
- return std::make_pair(brokenImageLoRes, 1);
-}
-
blink::Image* ImageResource::image()
{
ASSERT(!isPurgeable());
- if (errorOccurred()) {
- // Returning the 1x broken image is non-ideal, but we cannot reliably access the appropriate
- // deviceScaleFactor from here. It is critical that callers use ImageResource::brokenImage()
- // when they need the real, deviceScaleFactor-appropriate broken image icon.
- return brokenImage(1).first;
- }
-
if (m_image)
return m_image.get();
@@ -187,13 +169,6 @@ blink::Image* ImageResource::imageForRenderer(const RenderObject* renderer)
{
ASSERT(!isPurgeable());
- if (errorOccurred()) {
- // Returning the 1x broken image is non-ideal, but we cannot reliably access the appropriate
- // deviceScaleFactor from here. It is critical that callers use ImageResource::brokenImage()
- // when they need the real, deviceScaleFactor-appropriate broken image icon.
- return brokenImage(1).first;
- }
-
if (!m_image)
return blink::Image::nullImage();
« no previous file with comments | « sky/engine/core/fetch/ImageResource.h ('k') | sky/engine/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698