Implement set scissor on d3d render pass.
Change-Id: I36c748f7e91c0b9695623e60bd87b98605800159 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297017 Commit-Queue: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
c4d49056b4
commit
1f14ca04b9
@ -187,6 +187,15 @@ bool GrD3DOpsRenderPass::onBindPipeline(const GrProgramInfo& info, const SkRect&
|
||||
return true;
|
||||
}
|
||||
|
||||
void GrD3DOpsRenderPass::onSetScissorRect(const SkIRect& scissor) {
|
||||
SkIRect combinedScissorRect;
|
||||
if (!combinedScissorRect.intersect(fCurrentPipelineBounds, scissor)) {
|
||||
combinedScissorRect = SkIRect::MakeEmpty();
|
||||
}
|
||||
|
||||
set_scissor_rects(fGpu, fRenderTarget, fOrigin, combinedScissorRect);
|
||||
}
|
||||
|
||||
void update_resource_state(GrTexture* tex, GrRenderTarget* rt, GrD3DGpu* gpu) {
|
||||
SkASSERT(!tex->isProtected() || (rt->isProtected() && gpu->protectedContext()));
|
||||
GrD3DTexture* d3dTex = static_cast<GrD3DTexture*>(tex);
|
||||
|
@ -37,7 +37,7 @@ private:
|
||||
void onBegin() override;
|
||||
|
||||
bool onBindPipeline(const GrProgramInfo&, const SkRect& drawBounds) override;
|
||||
void onSetScissorRect(const SkIRect&) override {}
|
||||
void onSetScissorRect(const SkIRect&) override;
|
||||
bool onBindTextures(const GrPrimitiveProcessor&, const GrSurfaceProxy* const primProcTextures[],
|
||||
const GrPipeline&) override;
|
||||
void onBindBuffers(const GrBuffer* indexBuffer, const GrBuffer* instanceBuffer,
|
||||
|
Loading…
Reference in New Issue
Block a user