19dea94f1d
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
31 lines
751 B
C++
31 lines
751 B
C++
/*
|
|
* Copyright 2016 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file
|
|
*/
|
|
|
|
#ifndef TestingSpecialImageAccess_DEFINED
|
|
#define TestingSpecialImageAccess_DEFINED
|
|
|
|
class TestingSpecialImageAccess {
|
|
public:
|
|
static const SkIRect& Subset(const SkSpecialImage* img) {
|
|
return img->subset();
|
|
}
|
|
|
|
static bool PeekPixels(const SkSpecialImage* img, SkPixmap* pixmap) {
|
|
return img->testingOnlyPeekPixels(pixmap);
|
|
}
|
|
|
|
static GrTexture* PeekTexture(const SkSpecialImage* img) {
|
|
return img->peekTexture();
|
|
}
|
|
|
|
static bool GetROPixels(const SkSpecialImage* img, SkBitmap* result) {
|
|
return img->testingOnlyGetROPixels(result);
|
|
}
|
|
};
|
|
|
|
#endif
|