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

Unified Diff: src/core/SkBitmapDevice.cpp

Issue 1196683003: remove SkDeviceProperties (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up Created 5 years, 6 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
Index: src/core/SkBitmapDevice.cpp
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index 8e8c10244bd5beb139dd3c8fd094d36c42acf358..4ca6cc37cd5d8871fcada5f903f3f42275326eab 100644
--- a/src/core/SkBitmapDevice.cpp
+++ b/src/core/SkBitmapDevice.cpp
@@ -7,7 +7,6 @@
#include "SkBitmapDevice.h"
#include "SkConfig8888.h"
-#include "SkDeviceProperties.h"
#include "SkDraw.h"
#include "SkPixelRef.h"
#include "SkRasterClip.h"
@@ -63,15 +62,15 @@ SkBitmapDevice::SkBitmapDevice(const SkBitmap& bitmap) : fBitmap(bitmap) {
SkASSERT(valid_for_bitmap_device(bitmap.info(), NULL));
}
-SkBitmapDevice::SkBitmapDevice(const SkBitmap& bitmap, const SkDeviceProperties& deviceProperties)
- : SkBaseDevice(deviceProperties)
+SkBitmapDevice::SkBitmapDevice(const SkBitmap& bitmap, const SkSurfaceProps& surfaceProps)
+ : SkBaseDevice(surfaceProps)
, fBitmap(bitmap)
{
SkASSERT(valid_for_bitmap_device(bitmap.info(), NULL));
}
SkBitmapDevice* SkBitmapDevice::Create(const SkImageInfo& origInfo,
- const SkDeviceProperties* props) {
+ const SkSurfaceProps* surfaceProps) {
SkAlphaType newAT = origInfo.alphaType();
if (!valid_for_bitmap_device(origInfo, &newAT)) {
return NULL;
@@ -93,8 +92,8 @@ SkBitmapDevice* SkBitmapDevice::Create(const SkImageInfo& origInfo,
}
}
- if (props) {
- return SkNEW_ARGS(SkBitmapDevice, (bitmap, *props));
+ if (surfaceProps) {
+ return SkNEW_ARGS(SkBitmapDevice, (bitmap, *surfaceProps));
} else {
return SkNEW_ARGS(SkBitmapDevice, (bitmap));
}
@@ -117,7 +116,7 @@ void SkBitmapDevice::replaceBitmapBackendForRasterSurface(const SkBitmap& bm) {
}
SkBaseDevice* SkBitmapDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint*) {
- const SkDeviceProperties leaky(cinfo.fPixelGeometry);
+ const SkSurfaceProps leaky(0, cinfo.fPixelGeometry);
return SkBitmapDevice::Create(cinfo.fInfo, &leaky);
}

Powered by Google App Engine
This is Rietveld 408576698