diff options
Diffstat (limited to 'src/gpu/GrRenderTarget.cpp')
-rw-r--r-- | src/gpu/GrRenderTarget.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp index 61a6f92f22..8b1fde6b46 100644 --- a/src/gpu/GrRenderTarget.cpp +++ b/src/gpu/GrRenderTarget.cpp @@ -19,11 +19,13 @@ GrRenderTarget::GrRenderTarget(GrGpu* gpu, const GrSurfaceDesc& desc, Flags flags, GrStencilAttachment* stencil) - : INHERITED(gpu, desc) - , fStencilAttachment(stencil) - , fMultisampleSpecsID(0) - , fFlags(flags) { - SkASSERT(!(fFlags & Flags::kMixedSampled) || fDesc.fSampleCnt > 0); + : INHERITED(gpu, desc) + , fSampleCnt(desc.fSampleCnt) + , fStencilAttachment(stencil) + , fMultisampleSpecsID(0) + , fFlags(flags) { + SkASSERT(desc.fFlags & kRenderTarget_GrSurfaceFlag); + SkASSERT(!(fFlags & Flags::kMixedSampled) || fSampleCnt > 0); SkASSERT(!(fFlags & Flags::kWindowRectsSupport) || gpu->caps()->maxWindowRectangles() > 0); fResolveRect.setLargestInverted(); } |