From 5676b4a23a190b9a0e2f4d803fe17dbfa47caf7e Mon Sep 17 00:00:00 2001 From: "vandebo@chromium.org" Date: Mon, 3 Oct 2011 19:03:48 +0000 Subject: [PATCH] Revert r2122, r2116, r2108 Now that Chrome's PlatformDevice doesn't inherit from SkDevice. Review URL: http://codereview.appspot.com/5178045 git-svn-id: http://skia.googlecode.com/svn/trunk@2396 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkDevice.h | 7 ++----- include/pdf/SkPDFDevice.h | 7 ------- src/pdf/SkPDFDevice.cpp | 9 --------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h index d4afd69..95b6389 100644 --- a/include/core/SkDevice.h +++ b/include/core/SkDevice.h @@ -263,11 +263,6 @@ protected: virtual void lockPixels(); virtual void unlockPixels(); - // just called by SkCanvas when built as a layer - // TEMPORARY: promote from private to protected, until we find a better - // solution for proxy devices - void setOrigin(int x, int y) { fOrigin.set(x, y); } - private: friend class SkCanvas; friend struct DeviceCM; //for setMatrixClip @@ -275,6 +270,8 @@ private: friend class SkDrawIter; friend class SkDeviceFilteredPaint; + // just called by SkCanvas when built as a layer + void setOrigin(int x, int y) { fOrigin.set(x, y); } // just called by SkCanvas for saveLayer SkDevice* createCompatibleDeviceForSaveLayer(SkBitmap::Config config, int width, int height, diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h index 395968b..9e985e7 100644 --- a/include/pdf/SkPDFDevice.h +++ b/include/pdf/SkPDFDevice.h @@ -161,14 +161,7 @@ public: return *(fFontGlyphUsage.get()); } - // TODO(vandebo): Remove this as soon as Chrome's Platform device goes away. - void setOrigin(int x, int y); - virtual void setMatrixClip(const SkMatrix& m, const SkRegion& r, - const SkClipStack& c); - private: - typedef SkDevice INHERITED; - // TODO(vandebo): push most of SkPDFDevice's state into a core object in // order to get the right access levels without using friend. friend class ScopedContentEntry; diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index 8cf1eca..420da82 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -1131,15 +1131,6 @@ SkData* SkPDFDevice::copyContentToData() const { return data.copyToData(); } -void SkPDFDevice::setOrigin(int x, int y) { - INHERITED::setOrigin(x, y); -} - -void SkPDFDevice::setMatrixClip(const SkMatrix& m, const SkRegion& r, - const SkClipStack& c) { - INHERITED::setMatrixClip(m, r, c); -} - void SkPDFDevice::createFormXObjectFromDevice( SkRefPtr* xobject) { *xobject = new SkPDFFormXObject(this); -- 2.7.4