Revert "Use saveLayer-determined CT in SkGpuDevice::onCreateDevice"
This reverts commit 16559a1f9f
.
Reason for revert: ANGLE images look bad
Original change's description:
> Use saveLayer-determined CT in SkGpuDevice::onCreateDevice
>
> Currently Ganesh always uses the prev render target CT, but saveLayer
> may force a different CT, depending on flags.
>
> This fixes handling of saveLayer/kF16ColorType (added in
> https://skia-review.googlesource.com/c/skia/+/227066).
>
> Change-Id: Iab476c4afa4c70e25c452b2c430cbded5adb25e9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241876
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,brianosman@google.com,fmalita@chromium.org
Change-Id: I1e8eafbfdd7391c18eda4942cbdf0046a4ee2b53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243039
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
7b30b70299
commit
80c1f093cd
@ -1619,13 +1619,18 @@ SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint
|
||||
SkBackingFit fit = kNever_TileUsage == cinfo.fTileUsage ? SkBackingFit::kApprox
|
||||
: SkBackingFit::kExact;
|
||||
|
||||
SkASSERT(cinfo.fInfo.colorType() != kRGBA_1010102_SkColorType);
|
||||
GrColorType colorType = fRenderTargetContext->colorSpaceInfo().colorType();
|
||||
if (colorType == GrColorType::kRGBA_1010102) {
|
||||
// If the original device is 1010102, fall back to 8888 so that we have a usable alpha
|
||||
// channel in the layer.
|
||||
colorType = GrColorType::kRGBA_8888;
|
||||
}
|
||||
|
||||
auto rtc = fContext->priv().makeDeferredRenderTargetContext(
|
||||
fit,
|
||||
cinfo.fInfo.width(),
|
||||
cinfo.fInfo.height(),
|
||||
SkColorTypeToGrColorType(cinfo.fInfo.colorType()),
|
||||
colorType,
|
||||
fRenderTargetContext->colorSpaceInfo().refColorSpace(),
|
||||
fRenderTargetContext->numSamples(),
|
||||
GrMipMapped::kNo,
|
||||
|
Loading…
Reference in New Issue
Block a user