summaryrefslogtreecommitdiffstats
path: root/skia/ext/platform_device_linux.cc
diff options
context:
space:
mode:
authortwiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-25 15:31:51 +0000
committertwiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-25 15:31:51 +0000
commit2e2ed3b0a0325286ec7024d2d379fed9c141f8bb (patch)
treeb3a5dee8390c8f3eb976904b059687b00070a702 /skia/ext/platform_device_linux.cc
parenta1b30a606da0a1ace5df72c7decf04a4791ef197 (diff)
downloadchromium_src-2e2ed3b0a0325286ec7024d2d379fed9c141f8bb.zip
chromium_src-2e2ed3b0a0325286ec7024d2d379fed9c141f8bb.tar.gz
chromium_src-2e2ed3b0a0325286ec7024d2d379fed9c141f8bb.tar.bz2
Revert 98230 - CL removing inheritance of SkDevice from PlatformDevice.
PlatformDevice is now a base interface, which is implemented by the various flavours of BitmapPlatformDevice, and VectorPlatformDevice. The BitmapPlatformDevice and VectorPlatformDevice classes now inherit directly from SkDevice, or SkPDFDevice, as appropriate. PlatformDevice helper functions access the PlatformDevice interface attached to a SkDevice via meta-data on the SkDevice. BUG=none TEST=none Review URL: http://codereview.chromium.org/7633040 TBR=twiz@chromium.org,jbates@chromium.org, dpolukhin@chromium.org, sanjeevr@chromium.org Review URL: http://codereview.chromium.org/7754001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98233 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/platform_device_linux.cc')
-rw-r--r--skia/ext/platform_device_linux.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/skia/ext/platform_device_linux.cc b/skia/ext/platform_device_linux.cc
index f72e614..f633758 100644
--- a/skia/ext/platform_device_linux.cc
+++ b/skia/ext/platform_device_linux.cc
@@ -6,12 +6,23 @@
namespace skia {
-PlatformSurface PlatformDevice::BeginPlatformPaint() {
- return NULL;
+PlatformDevice::PlatformDevice(const SkBitmap& bitmap)
+ : SkDevice(bitmap) {
+ SetPlatformDevice(this, this);
+}
+
+bool PlatformDevice::IsNativeFontRenderingAllowed() {
+ return true;
}
void PlatformDevice::EndPlatformPaint() {
// We don't need to do anything on Linux here.
}
+void PlatformDevice::DrawToNativeContext(PlatformSurface surface, int x, int y,
+ const PlatformRect* src_rect) {
+ // Should never be called on Linux.
+ SkASSERT(false);
+}
+
} // namespace skia