Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: src/image/SkImage.cpp

Issue 1364263002: Remove SkImage::newImage() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkImage.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage.cpp
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp
index 032be1949359a77f19d1dae332e441397db9684a..b639821a95375e019a30b3f599fd3487daa0d85f 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;
« no previous file with comments | « include/core/SkImage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698