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

Unified Diff: src/gpu/GrFixedClip.h

Issue 2271053004: Convert drawPaint to drawRRect in simple cases (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix another msvs warning 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 | « src/gpu/GrDrawContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrFixedClip.h
diff --git a/src/gpu/GrFixedClip.h b/src/gpu/GrFixedClip.h
index 01498c11613429330606e833ce29cfb9ee6ac9dd..705b2eada9ebe657163a59a4563e27d5e0c58ebe 100644
--- a/src/gpu/GrFixedClip.h
+++ b/src/gpu/GrFixedClip.h
@@ -39,6 +39,22 @@ public:
void getConservativeBounds(int width, int height, SkIRect* devResult,
bool* isIntersectionOfRects) const final;
+ bool isRRect(const SkRect& rtBounds, SkRRect* rr, bool* aa) const override {
+ if (fHasStencilClip) {
+ return false;
+ }
+ if (fScissorState.enabled()) {
+ SkRect rect = SkRect::Make(fScissorState.rect());
+ if (!rect.intersects(rtBounds)) {
+ return false;
+ }
+ rr->setRect(rect);
+ *aa = false;
+ return true;
+ }
+ return false;
+ };
+
private:
bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSettings,
GrAppliedClip* out) const final;
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698