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

Unified Diff: include/core/SkCanvas.h

Issue 2267273006: GPU implementation of drawRegion() (Closed) Base URL: https://skia.googlesource.com/skia.git@drawregion
Patch Set: SkToBool 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
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrDrawContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 0409057cab13828945543a8e1e0843e5744f4a0b..ec43987114cf589a1f337c2048f3fc32e16d8e0c 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698