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

Unified Diff: src/core/SkSpecialImage.cpp

Issue 2164763003: remove dead methods now that we use specials exclusively for imagefilters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove internal_getBM/fromBM Created 4 years, 5 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 | « src/core/SkSpecialImage.h ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSpecialImage.cpp
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp
index e3a14e57abde5ff8016d98ebbeb41b08d2082f8a..a4ffa198d5a9d05d883bc8d6c3f9e5b229fe704c 100644
--- a/src/core/SkSpecialImage.cpp
+++ b/src/core/SkSpecialImage.cpp
@@ -81,7 +81,11 @@ sk_sp<SkSpecialImage> SkSpecialImage::makeTextureImage(GrContext* context) {
}
SkBitmap bmp;
- if (!this->internal_getBM(&bmp)) {
+ // At this point, we are definitely not texture-backed, so we must be raster or generator
+ // backed. If we remove the special-wrapping-an-image subclass, we may be able to assert that
+ // we are strictly raster-backed (i.e. generator images become raster when they are specialized)
+ // in which case getROPixels could turn into peekPixels...
+ if (!this->getROPixels(&bmp)) {
return nullptr;
}
@@ -161,28 +165,6 @@ sk_sp<SkImage> SkSpecialImage::makeTightSubset(const SkIRect& subset) const {
#include "SkGrPixelRef.h"
#endif
-sk_sp<SkSpecialImage> SkSpecialImage::internal_fromBM(const SkBitmap& src,
- const SkSurfaceProps* props) {
-#if SK_SUPPORT_GPU
- // Need to test offset case! (see skbug.com/4967)
- if (src.getTexture()) {
- return SkSpecialImage::MakeFromGpu(src.bounds(),
- src.getGenerationID(),
- sk_ref_sp(src.getTexture()),
- props);
- }
-#endif
-
- return SkSpecialImage::MakeFromRaster(src.bounds(), src, props);
-}
-
-bool SkSpecialImage::internal_getBM(SkBitmap* result) {
- const SkSpecialImage_Base* ib = as_SIB(this);
-
- // TODO: need to test offset case! (see skbug.com/4967)
- return ib->getBitmapDeprecated(result);
-}
-
///////////////////////////////////////////////////////////////////////////////
#include "SkImage.h"
#if SK_SUPPORT_GPU
« no previous file with comments | « src/core/SkSpecialImage.h ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698