diff options
author | 2015-03-13 07:28:28 -0700 | |
---|---|---|
committer | 2015-03-13 07:28:29 -0700 | |
commit | 0e040f7da2fdfeb49aa60d24117306e3b1e6ea90 (patch) | |
tree | 7f2d8465c88766c158c1816cc60021866a55f651 /src/gpu/SkGpuDevice.h | |
parent | 1182d9a96b80bd12183ee7c81325a979a51ee0c0 (diff) |
Revert of Change device creation to see the (optional) layer-paint (patchset #9 id:160001 of https://codereview.chromium.org/988413003/)
Reason for revert:
need to have chrome opt-in for the older API before this can land (in chrome)
Original issue's description:
> Change device creation to see the (optional) layer-paint
>
> Motivation:
>
> PDFDevice currently relies on 1) being told that the layer's paint has an imagefilter, and in the case, it creates a rasterdevice. It then relies on (2) canvas itself sniffing the layer's paint and offering to apply-the-imagefilter to call drawSprite instead of drawDevice.
>
> This subtle interchange is fragile, and also does not support other unsupported PDF features like colorfilters. This CL is a step toward making this use-raster-instead-of-native approach to layers more completely in the subclass' hands.
>
> Committed: https://skia.googlesource.com/skia/+/1182d9a96b80bd12183ee7c81325a979a51ee0c0
TBR=halcanary@google.com,senorblanco@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1008863002
Diffstat (limited to 'src/gpu/SkGpuDevice.h')
-rw-r--r-- | src/gpu/SkGpuDevice.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h index 50aa58685f..6b520e7174 100644 --- a/src/gpu/SkGpuDevice.h +++ b/src/gpu/SkGpuDevice.h @@ -51,9 +51,9 @@ public: virtual ~SkGpuDevice(); SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { - SkBaseDevice* dev = this->onCreateDevice(CreateInfo(this->imageInfo(), kPossible_TileUsage, - props.pixelGeometry()), - NULL); + SkBaseDevice* dev = this->onCreateCompatibleDevice(CreateInfo(this->imageInfo(), + kGeneral_Usage, + props.pixelGeometry())); return static_cast<SkGpuDevice*>(dev); } @@ -147,7 +147,7 @@ private: SkGpuDevice(GrRenderTarget*, const SkSurfaceProps*, unsigned flags); - SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) SK_OVERRIDE; + SkBaseDevice* onCreateCompatibleDevice(const CreateInfo&) SK_OVERRIDE; SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE; |