Index: src/gpu/GrDrawTarget.cpp |
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp |
index 8beaade32c16b2d8ceb7f163963c2f38dea7b96f..bffe2f9740958fa0ad94f0774edd6bd45818a4aa 100644 |
--- a/src/gpu/GrDrawTarget.cpp |
+++ b/src/gpu/GrDrawTarget.cpp |
@@ -469,15 +469,13 @@ void GrDrawTarget::clear(const SkIRect* rect, |
drawContext->discard(); |
} |
- // TODO: flip this into real draw! |
- GrPipelineBuilder pipelineBuilder; |
- pipelineBuilder.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); |
- |
SkRect scalarRect = SkRect::Make(*rect); |
- SkAutoTUnref<GrDrawBatch> batch( |
- GrRectBatchFactory::CreateNonAAFill(color, SkMatrix::I(), scalarRect, |
- nullptr, nullptr)); |
- this->drawBatch(pipelineBuilder, drawContext, GrNoClip(), batch); |
+ |
+ GrPaint paint; |
+ paint.setColor4f(GrColor4f::FromGrColor(color)); |
+ paint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); |
+ |
+ drawContext->drawRect(GrNoClip(), paint, SkMatrix::I(), scalarRect); |
} else { |
GrBatch* batch = new GrClearBatch(*rect, color, drawContext->accessRenderTarget()); |
this->recordBatch(batch, batch->bounds()); |