aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2015-09-24 07:43:41 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-24 07:43:41 -0700
commit3f9deab9fc0e0aba77dfa0fe09e7ef01921ce689 (patch)
tree22b07ea22a382ea53b17adb883003528e7a21b1b /src
parent7f0a3d7523377097184309152f883f1fcb12a4b8 (diff)
Remove SkImage::newImage()
All clients converted to newSubset(). R=reed@google.com Review URL: https://codereview.chromium.org/1364263002
Diffstat (limited to 'src')
-rw-r--r--src/image/SkImage.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp
index 032be19493..b639821a95 100644
--- a/src/image/SkImage.cpp
+++ b/src/image/SkImage.cpp
@@ -132,38 +132,6 @@ const char* SkImage::toString(SkString* str) const {
return str->c_str();
}
-#ifdef SK_SUPPORT_LEGACY_NEWIMAGE
-SkImage* SkImage::newImage(int newWidth, int newHeight, const SkIRect* subset) const {
-#if 0
- if (newWidth <= 0 || newHeight <= 0) {
- return nullptr;
- }
-
- const SkIRect bounds = SkIRect::MakeWH(this->width(), this->height());
-
- if (subset) {
- if (!bounds.contains(*subset)) {
- return nullptr;
- }
- if (bounds == *subset) {
- subset = nullptr; // and fall through to check below
- }
- }
-
- if (nullptr == subset && this->width() == newWidth && this->height() == newHeight) {
- return SkRef(const_cast<SkImage*>(this));
- }
-
- return as_IB(this)->onNewImage(newWidth, newHeight, subset, quality);
-#else
- SkASSERT(subset);
- SkASSERT(subset->width() == newWidth);
- SkASSERT(subset->height() == newHeight);
- return this->newSubset(*subset);
-#endif
-}
-#endif
-
SkImage* SkImage::newSubset(const SkIRect& subset) const {
if (subset.isEmpty()) {
return nullptr;