diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-04 13:50:34 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-04 13:50:34 +0000 |
commit | 3048d4fd4e11399e412db4b3338cc0ff5a22b2b1 (patch) | |
tree | a28e9ffa1e40695a598dbc0a8cb8e3bb54f66935 /src | |
parent | bf2a46941e8fdebfcd24ea8f7184779021898225 (diff) |
remove deprecated getViewport/setViewport
git-svn-id: http://skia.googlecode.com/svn/trunk@1235 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkCanvas.cpp | 17 | ||||
-rw-r--r-- | src/utils/SkNinePatch.cpp | 2 | ||||
-rw-r--r-- | src/utils/SkProxyCanvas.cpp | 4 |
3 files changed, 1 insertions, 22 deletions
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); } |