Fix color blending for analytic shadows
Change-Id: I74e8c385a87a3f397b2df53679fcfd9120d82954 Reviewed-on: https://skia-review.googlesource.com/15645 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
6d342285a4
commit
7633477b64
@ -215,8 +215,7 @@ bool SkAmbientShadowMaskFilterImpl::directFilterRRectMaskGPU(GrContext*,
|
||||
|
||||
GrPaint newPaint(paint);
|
||||
GrColor4f color = newPaint.getColor4f();
|
||||
color.fRGBA[3] *= fAmbientAlpha;
|
||||
newPaint.setColor4f(color);
|
||||
newPaint.setColor4f(color.mulByScalar(fAmbientAlpha));
|
||||
if (SkToBool(fFlags & SkShadowFlags::kTransparentOccluder_ShadowFlag)) {
|
||||
// set a large inset to force a fill
|
||||
devSpaceInsetWidth = ambientRRect.width();
|
||||
|
@ -297,8 +297,7 @@ bool SkSpotShadowMaskFilterImpl::directFilterRRectMaskGPU(GrContext*,
|
||||
}
|
||||
|
||||
GrColor4f color = paint.getColor4f();
|
||||
color.fRGBA[3] *= fSpotAlpha;
|
||||
paint.setColor4f(color);
|
||||
paint.setColor4f(color.mulByScalar(fSpotAlpha));
|
||||
rtContext->drawShadowRRect(clip, std::move(paint), viewMatrix, spotShadowRRect,
|
||||
devSpaceSpotBlur, insetWidth);
|
||||
|
||||
|
@ -191,6 +191,9 @@ GrGpu* GrGLGpu::Create(GrBackendContext backendContext, const GrContextOptions&
|
||||
if (!glInterface) {
|
||||
return nullptr;
|
||||
}
|
||||
#ifdef USE_NSIGHT
|
||||
const_cast<GrContextOptions&>(options).fSuppressPathRendering = true;
|
||||
#endif
|
||||
GrGLContext* glContext = GrGLContext::Create(glInterface.get(), options);
|
||||
if (glContext) {
|
||||
return new GrGLGpu(glContext, context);
|
||||
|
Loading…
Reference in New Issue
Block a user