Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: include/core/SkCanvas.h

Issue 2267273006: GPU implementation of drawRegion() (Closed) Base URL: https://skia.googlesource.com/skia.git@drawregion
Patch Set: Response to comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 60f93029f66617fa698ddd91fc41cef8a30f8828..a726c44ef6f1feb0dad85d0d443530271b72da67 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -707,6 +707,10 @@ public:
@param paint The paint used to draw the region
*/
void drawRegion(const SkRegion& region, const SkPaint& paint) {
+ if (region.isEmpty()) {
+ return;
+ }
+
this->onDrawRegion(region, paint);
}
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrDrawContext.h » ('j') | src/gpu/GrDrawContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698