diff options
author | robertphillips <robertphillips@google.com> | 2016-03-16 10:39:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-16 10:39:09 -0700 |
commit | 19dea94f1d073c20dfd26d36a7f86e0bc57f04e0 (patch) | |
tree | ee853ef0a8d49a2ed446f87791799dfb353e79ae /src/core/SkSpecialImage.h | |
parent | 5f939ab658a228dce34a3b14a545638407150b92 (diff) |
Revert of Add SkSpecialImage::extractSubset & NewFromPixmap (patchset #5 id:80001 of https://codereview.chromium.org/1787883002/ )
Reason for revert:
Need to wean ImagePixelLocker.h off of SkAutoPixmapStorage :(
Original issue's description:
> Add SkSpecialImage::extractSubset & NewFromPixmap
>
> This is calved off of: https://codereview.chromium.org/1785643003/ (Switch SkBlurImageFilter over to new onFilterImage interface)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1787883002
>
> Committed: https://skia.googlesource.com/skia/+/250581493a0859987e482810879e85e5ac2dc002
TBR=bsalomon@google.com,reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1808833002
Diffstat (limited to 'src/core/SkSpecialImage.h')
-rw-r--r-- | src/core/SkSpecialImage.h | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/src/core/SkSpecialImage.h b/src/core/SkSpecialImage.h index b1b6a28d6a..e90de097fb 100644 --- a/src/core/SkSpecialImage.h +++ b/src/core/SkSpecialImage.h @@ -63,27 +63,16 @@ public: uint32_t uniqueID, GrTexture*, SkAlphaType at = kPremul_SkAlphaType); - static SkSpecialImage* NewFromPixmap(SkImageFilter::Proxy*, - const SkIRect& subset, - const SkPixmap&, - void (*releaseProc)(void* addr, void* context), - void* context); /** * Create a new surface with a backend that is compatible with this image. */ SkSpecialSurface* newSurface(const SkImageInfo&) const; - /** - * Extract a subset of this special image and return it as a special image. - * It may or may not point to the same backing memory. - */ - SkSpecialImage* extractSubset(const SkIRect& subset) const; - // These three internal methods will go away (see skbug.com/4965) bool internal_getBM(SkBitmap* result); static SkSpecialImage* internal_fromBM(SkImageFilter::Proxy*, const SkBitmap&); - SkImageFilter::Proxy* internal_getProxy() const; + SkImageFilter::Proxy* internal_getProxy(); // TODO: hide this when GrLayerHoister uses SkSpecialImages more fully (see skbug.com/5063) /** @@ -92,20 +81,6 @@ public: */ GrTexture* peekTexture() const; - // TODO: hide this whe the imagefilter all have a consistent draw path (see skbug.com/5063) - /** - * If the SpecialImage is backed by cpu pixels, return the const address - * of those pixels and, if not null, the ImageInfo, rowBytes, and, if present, - * the color table. The returned address(es) is/are only valid while the image object - * is in scope. - * - * The returned ImageInfo represents the backing memory. Use 'subset' - * to get the active portion's dimensions. - * - * On failure, return false and ignore the pixmap parameter. - */ - bool peekPixels(SkPixmap*) const; - protected: SkSpecialImage(SkImageFilter::Proxy* proxy, const SkIRect& subset, uint32_t uniqueID) : fSubset(subset) @@ -118,6 +93,18 @@ protected: friend class TestingSpecialImageAccess; friend class TestingSpecialSurfaceAccess; + /** + * If the SpecialImage is backed by cpu pixels, return the const address + * of those pixels and, if not null, return the ImageInfo and rowBytes. + * The returned address is only valid while the image object is in scope. + * + * The returned ImageInfo represents the backing memory. Use 'subset' + * to get the active portion's dimensions. + * + * On failure, return false and ignore the pixmap parameter. + */ + bool testingOnlyPeekPixels(SkPixmap*) const; + // This entry point is for testing only. It does a readback from VRAM for // GPU-backed special images. bool testingOnlyGetROPixels(SkBitmap*) const; |