| Index: src/gpu/GrDrawContext.cpp
|
| diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
|
| index 344ae1c2ab0ad81d9a877963ffff16ef8c1e82f2..0a6ab5b52704876ff8976489db3ecc114d3f8a2a 100644
|
| --- a/src/gpu/GrDrawContext.cpp
|
| +++ b/src/gpu/GrDrawContext.cpp
|
| @@ -203,10 +203,12 @@ void GrDrawContext::clear(const SkIRect* rect,
|
|
|
| const SkIRect rtRect = SkIRect::MakeWH(this->width(), this->height());
|
| SkIRect clippedRect;
|
| + bool isFull = false;
|
| if (!rect ||
|
| (canIgnoreRect && fContext->caps()->fullClearIsFree()) ||
|
| rect->contains(rtRect)) {
|
| rect = &rtRect;
|
| + isFull = true;
|
| } else {
|
| clippedRect = *rect;
|
| if (!clippedRect.intersect(rtRect)) {
|
| @@ -228,6 +230,8 @@ void GrDrawContext::clear(const SkIRect* rect,
|
| paint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
|
|
|
| this->drawRect(GrNoClip(), paint, SkMatrix::I(), SkRect::Make(*rect));
|
| + } else if (isFull) {
|
| + this->getDrawTarget()->fullClear(this->accessRenderTarget(), color);
|
| } else {
|
| sk_sp<GrBatch> batch = GrClearBatch::Make(*rect, color, this->accessRenderTarget());
|
| this->getDrawTarget()->addBatch(std::move(batch));
|
|
|