diff options
Diffstat (limited to 'src/core/SkDevice.cpp')
-rw-r--r-- | src/core/SkDevice.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp index 0c0133558b..ae283b04ef 100644 --- a/src/core/SkDevice.cpp +++ b/src/core/SkDevice.cpp @@ -57,7 +57,7 @@ SkDevice::~SkDevice() { } SkDeviceFactory* SkDevice::onNewDeviceFactory() { - return SkNEW(SkRasterDeviceFactory); + return NULL; } SkDeviceFactory* SkDevice::getDeviceFactory() { @@ -67,6 +67,27 @@ SkDeviceFactory* SkDevice::getDeviceFactory() { return fCachedDeviceFactory; } +SkDevice* SkDevice::createCompatibleDevice(SkBitmap::Config config, + int width, int height, + bool isOpaque) { + return this->onCreateCompatibleDevice(config, width, height, + isOpaque, kGeneral_Usage); +} + +SkDevice* SkDevice::createCompatibleDeviceForSaveLayer(SkBitmap::Config config, + int width, int height, + bool isOpaque) { + return this->onCreateCompatibleDevice(config, width, height, + isOpaque, kSaveLayer_Usage); +} + +SkDevice* SkDevice::onCreateCompatibleDevice(SkBitmap::Config config, + int width, int height, + bool isOpaque, + Usage usage) { + return SkNEW_ARGS(SkDevice,(config, width, height, isOpaque)); +} + SkMetaData& SkDevice::getMetaData() { // metadata users are rare, so we lazily allocate it. If that changes we // can decide to just make it a field in the device (rather than a ptr) |