Chromium Code Reviews

Unified Diff: src/gpu/GrClip.cpp

Issue 936943002: Pass clip to context (Closed) Base URL: https://skia.googlesource.com/skia.git@pass_down_rendertarget
Patch Set: more cleanup Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/gpu/GrClip.cpp
diff --git a/src/gpu/GrClip.cpp b/src/gpu/GrClip.cpp
index 0f8aac874953237dfd03323c516d2879b2edfc38..dbd882ca5a15db995258a3417cbb24b12b2f004d 100644
--- a/src/gpu/GrClip.cpp
+++ b/src/gpu/GrClip.cpp
@@ -35,6 +35,15 @@ void GrClip::getConservativeBounds(int width, int height, SkIRect* devResult,
*isIntersectionOfRects = true;
}
} break;
+ case kRect_ClipType: {
+ devResult->setLTRB(SkScalarCeilToInt(this->rect().fLeft),
+ SkScalarCeilToInt(this->rect().fTop),
+ SkScalarCeilToInt(this->rect().fRight),
+ SkScalarCeilToInt(this->rect().fBottom));
+ if (isIntersectionOfRects) {
+ *isIntersectionOfRects = true;
+ }
+ } break;
case kClipStack_ClipType: {
SkRect devBounds;
this->clipStack()->getConservativeBounds(-this->origin().fX,

Powered by Google App Engine