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

Unified Diff: src/core/SkDevice.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/SkDevice.cpp
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index 45d4b301b509a3a8d5fe397e9bafb780ed073c1a..d53983c6505301d0cd8125a827c4e469a8014945 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -6,7 +6,6 @@
*/
#include "SkDevice.h"
-#include "SkDeviceProperties.h"
#include "SkDraw.h"
#include "SkDrawFilter.h"
#include "SkImage_Base.h"
@@ -19,7 +18,7 @@
#include "SkTextToPathIter.h"
SkBaseDevice::SkBaseDevice()
- : fLeakyProperties(SkNEW(SkDeviceProperties))
+ : fLeakyProperties(SkSurfaceProps::kLegacyFontHost_InitType)
#ifdef SK_DEBUG
, fAttachedToCanvas(false)
#endif
@@ -28,8 +27,8 @@ SkBaseDevice::SkBaseDevice()
fMetaData = NULL;
}
-SkBaseDevice::SkBaseDevice(const SkDeviceProperties& dp)
- : fLeakyProperties(SkNEW_ARGS(SkDeviceProperties, (dp)))
+SkBaseDevice::SkBaseDevice(const SkSurfaceProps& surfaceProps)
+ : fLeakyProperties(surfaceProps)
#ifdef SK_DEBUG
, fAttachedToCanvas(false)
#endif
@@ -39,7 +38,6 @@ SkBaseDevice::SkBaseDevice(const SkDeviceProperties& dp)
}
SkBaseDevice::~SkBaseDevice() {
- SkDELETE(fLeakyProperties);
SkDELETE(fMetaData);
}
@@ -86,9 +84,9 @@ void SkBaseDevice::initForRootLayer(SkPixelGeometry geo) {
// For now we don't expect to change the geometry for the root-layer, but we make the call
// anyway to document logically what is going on.
//
- fLeakyProperties->setPixelGeometry(CreateInfo::AdjustGeometry(this->imageInfo(),
- kPossible_TileUsage,
- geo));
+ fLeakyProperties.setPixelGeometry_dont_use(CreateInfo::AdjustGeometry(this->imageInfo(),
+ kPossible_TileUsage,
+ geo));
}
void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer,
@@ -371,7 +369,7 @@ uint32_t SkBaseDevice::filterTextFlags(const SkPaint& paint) const {
return flags;
}
- if (kUnknown_SkPixelGeometry == fLeakyProperties->pixelGeometry()
+ if (kUnknown_SkPixelGeometry == fLeakyProperties.pixelGeometry()
|| this->onShouldDisableLCD(paint)) {
flags &= ~SkPaint::kLCDRenderText_Flag;
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkDeviceProperties.h » ('j') | src/gpu/SkGpuDevice.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698