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

Unified Diff: Source/platform/DragImage.cpp

Issue 1008243003: Nuke NativeImageSkia -- new version. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add more WARN_UNUSED_RETURN goodness Created 5 years, 9 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/svg/graphics/filters/SVGFEImage.cpp ('k') | Source/platform/DragImageTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/DragImage.cpp
diff --git a/Source/platform/DragImage.cpp b/Source/platform/DragImage.cpp
index 24631487d3e8b0ae4c906b7d20d153a817e2a2e5..efe9665e7026aefdcce70f81e2792cc99c4dbe45 100644
--- a/Source/platform/DragImage.cpp
+++ b/Source/platform/DragImage.cpp
@@ -41,7 +41,6 @@
#include "platform/graphics/ImageBuffer.h"
#include "platform/graphics/paint/DisplayItemList.h"
#include "platform/graphics/paint/DrawingRecorder.h"
-#include "platform/graphics/skia/NativeImageSkia.h"
#include "platform/text/BidiTextRun.h"
#include "platform/text/StringTruncator.h"
#include "platform/text/TextRun.h"
@@ -75,8 +74,8 @@ PassOwnPtr<DragImage> DragImage::create(Image* image, RespectImageOrientationEnu
if (!image)
return nullptr;
- RefPtr<NativeImageSkia> bitmap = image->nativeImageForCurrentFrame();
- if (!bitmap)
+ SkBitmap bitmap;
+ if (!image->bitmapForCurrentFrame(&bitmap))
return nullptr;
if (image->isBitmapImage()) {
@@ -99,14 +98,14 @@ PassOwnPtr<DragImage> DragImage::create(Image* image, RespectImageOrientationEnu
skBitmap.eraseColor(SK_ColorTRANSPARENT);
SkCanvas canvas(skBitmap);
canvas.concat(affineTransformToSkMatrix(orientation.transformFromDefault(sizeRespectingOrientation)));
- canvas.drawBitmapRect(bitmap->bitmap(), 0, destRect);
+ canvas.drawBitmapRect(bitmap, 0, destRect);
return adoptPtr(new DragImage(skBitmap, deviceScaleFactor, interpolationQuality));
}
}
SkBitmap skBitmap;
- if (!bitmap->bitmap().copyTo(&skBitmap, kN32_SkColorType))
+ if (!bitmap.copyTo(&skBitmap, kN32_SkColorType))
return nullptr;
return adoptPtr(new DragImage(skBitmap, deviceScaleFactor, interpolationQuality));
}
« no previous file with comments | « Source/core/svg/graphics/filters/SVGFEImage.cpp ('k') | Source/platform/DragImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698