aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/core/SkCanvas.h16
-rw-r--r--include/utils/SkProxyCanvas.h2
-rw-r--r--src/core/SkCanvas.cpp17
-rw-r--r--src/utils/SkNinePatch.cpp2
-rw-r--r--src/utils/SkProxyCanvas.cpp4
5 files changed, 1 insertions, 40 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index b1222eb874..273153f991 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -75,22 +75,6 @@ public:
///////////////////////////////////////////////////////////////////////////
- /** If the Device supports GL viewports, return true and set size (if not
- null) to the size of the viewport. If it is not supported, ignore size
- and return false.
-
- DEPRECATED: the gpu-device backend takes care of managing the viewport
- */
- virtual bool getViewport(SkIPoint* size) const;
-
- /** If the Device supports GL viewports, return true and set the viewport
- to the specified x and y dimensions. If it is not supported, ignore x
- and y and return false.
-
- DEPRECATED: the gpu-device backend takes care of managing the viewport
- */
- virtual bool setViewport(int x, int y);
-
/** Return the canvas' device object, which may be null. The device holds
the bitmap of the pixels that the canvas draws into. The reference count
of the returned device is not changed by this call.
diff --git a/include/utils/SkProxyCanvas.h b/include/utils/SkProxyCanvas.h
index 98ef778193..6e55aa6251 100644
--- a/include/utils/SkProxyCanvas.h
+++ b/include/utils/SkProxyCanvas.h
@@ -21,8 +21,6 @@ public:
// overrides from SkCanvas
- virtual bool getViewport(SkIPoint* size) const;
-
virtual int save(SaveFlags flags = kMatrixClip_SaveFlag);
virtual int saveLayer(const SkRect* bounds, const SkPaint* paint,
SaveFlags flags = kARGB_ClipLayer_SaveFlag);
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index dbd4852006..e2d70eede7 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -594,23 +594,6 @@ void SkCanvas::writePixels(const SkBitmap& bitmap, int x, int y) {
//////////////////////////////////////////////////////////////////////////////
-bool SkCanvas::getViewport(SkIPoint* size) const {
- if ((getDevice()->getDeviceCapabilities() & SkDevice::kGL_Capability) == 0)
- return false;
- if (size)
- size->set(getDevice()->width(), getDevice()->height());
- return true;
-}
-
-bool SkCanvas::setViewport(int width, int height) {
- if ((getDevice()->getDeviceCapabilities() & SkDevice::kGL_Capability) == 0)
- return false;
-
- this->setDevice(this->createDevice(SkBitmap::kARGB_8888_Config, width, height,
- false, false))->unref();
- return true;
-}
-
void SkCanvas::updateDeviceCMCache() {
if (fDeviceCMDirty) {
const SkMatrix& totalMatrix = this->getTotalMatrix();
diff --git a/src/utils/SkNinePatch.cpp b/src/utils/SkNinePatch.cpp
index 0b601eb660..bbda573294 100644
--- a/src/utils/SkNinePatch.cpp
+++ b/src/utils/SkNinePatch.cpp
@@ -282,7 +282,7 @@ void SkNinePatch::DrawNine(SkCanvas* canvas, const SkRect& bounds,
when not in GL, the vertices impl is slower (more math) than calling
the viaRects code.
*/
- if (canvas->getViewport(NULL)) { // returns true for OpenGL
+ if (false /* is our canvas backed by a gpu?*/) {
int32_t xDivs[2];
int32_t yDivs[2];
diff --git a/src/utils/SkProxyCanvas.cpp b/src/utils/SkProxyCanvas.cpp
index 4336181bf0..05823eaabe 100644
--- a/src/utils/SkProxyCanvas.cpp
+++ b/src/utils/SkProxyCanvas.cpp
@@ -14,10 +14,6 @@ void SkProxyCanvas::setProxy(SkCanvas* proxy) {
///////////////////////////////// Overrides ///////////
-bool SkProxyCanvas::getViewport(SkIPoint* size) const {
- return fProxy->getViewport(size);
-}
-
int SkProxyCanvas::save(SaveFlags flags) {
return fProxy->save(flags);
}