diff options
author | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2010-10-26 19:47:30 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2010-10-26 19:47:30 +0000 |
commit | 35fc62b960db6739b19c59576085663796951e47 (patch) | |
tree | a8f3c6354267feb10bbdb9f507d623396baaeede /src/core | |
parent | ddbbd805b5b453e12cda0b3300e5655d8fb2bc19 (diff) |
Move the device capability method to SkDevice.
These are not the capabilities of the factory, but of the device. Additionally, it is more often needed when you have a device then when you have a factory, which caused creating of a new factory.
Review URL: http://codereview.appspot.com/2720041
git-svn-id: http://skia.googlecode.com/svn/trunk@618 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkCanvas.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index bb8c2be9b3..5a855bb636 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -536,8 +536,7 @@ SkDevice* SkCanvas::setBitmapDevice(const SkBitmap& bitmap) { ////////////////////////////////////////////////////////////////////////////// bool SkCanvas::getViewport(SkIPoint* size) const { - if ((fDeviceFactory->getDeviceCapabilities() - & SkDeviceFactory::kGL_Capability) == 0) + if ((getDevice()->getDeviceCapabilities() & SkDevice::kGL_Capability) == 0) return false; if (size) size->set(getDevice()->width(), getDevice()->height()); @@ -545,8 +544,7 @@ bool SkCanvas::getViewport(SkIPoint* size) const { } bool SkCanvas::setViewport(int width, int height) { - if ((fDeviceFactory->getDeviceCapabilities() - & SkDeviceFactory::kGL_Capability) == 0) + if ((getDevice()->getDeviceCapabilities() & SkDevice::kGL_Capability) == 0) return false; this->setDevice(createDevice(SkBitmap::kARGB_8888_Config, width, height, false, false))->unref(); |