| Index: src/gpu/GrFixedClip.cpp
|
| diff --git a/src/gpu/GrFixedClip.cpp b/src/gpu/GrFixedClip.cpp
|
| index 7385028bafb0197e61baae0f8bac1372259368d4..ebdd49bbf80f1ea789c8d1a5b61a94337ecf035a 100644
|
| --- a/src/gpu/GrFixedClip.cpp
|
| +++ b/src/gpu/GrFixedClip.cpp
|
| @@ -10,45 +10,25 @@
|
| #include "GrAppliedClip.h"
|
| #include "GrDrawContext.h"
|
|
|
| -bool GrFixedClip::quickContains(const SkRect& rect) const {
|
| - if (fWindowRectsState.enabled()) {
|
| - return false;
|
| - }
|
| - return !fScissorState.enabled() || GrClip::IsInsideClip(fScissorState.rect(), rect);
|
| -}
|
| -
|
| -void GrFixedClip::getConservativeBounds(int w, int h, SkIRect* devResult, bool* iior) const {
|
| - devResult->setXYWH(0, 0, w, h);
|
| +void GrFixedClip::getConservativeBounds(int width, int height, SkIRect* devResult,
|
| + bool* isIntersectionOfRects) const {
|
| + devResult->setXYWH(0, 0, width, height);
|
| if (fScissorState.enabled()) {
|
| if (!devResult->intersect(fScissorState.rect())) {
|
| devResult->setEmpty();
|
| }
|
| }
|
| - if (iior) {
|
| - *iior = true;
|
| + if (isIntersectionOfRects) {
|
| + *isIntersectionOfRects = true;
|
| }
|
| }
|
|
|
| -bool GrFixedClip::isRRect(const SkRect& rtBounds, SkRRect* rr, bool* aa) const {
|
| - if (fWindowRectsState.enabled()) {
|
| - return false;
|
| - }
|
| +bool GrFixedClip::apply(GrContext*, GrDrawContext* drawContext, bool isHWAntiAlias,
|
| + bool hasUserStencilSettings, GrAppliedClip* out) const {
|
| if (fScissorState.enabled()) {
|
| - SkRect rect = SkRect::Make(fScissorState.rect());
|
| - if (!rect.intersects(rtBounds)) {
|
| - return false;
|
| - }
|
| - rr->setRect(rect);
|
| - *aa = false;
|
| - return true;
|
| - }
|
| - return false;
|
| -};
|
| -
|
| -bool GrFixedClip::apply(GrContext*, GrDrawContext* dc, bool, bool, GrAppliedClip* out) const {
|
| - if (fScissorState.enabled()) {
|
| - SkIRect tightScissor = SkIRect::MakeWH(dc->width(), dc->height());
|
| - if (!tightScissor.intersect(fScissorState.rect())) {
|
| + SkIRect tightScissor;
|
| + if (!tightScissor.intersect(fScissorState.rect(),
|
| + SkIRect::MakeWH(drawContext->width(), drawContext->height()))) {
|
| return false;
|
| }
|
| if (IsOutsideClip(tightScissor, out->clippedDrawBounds())) {
|
| @@ -59,10 +39,6 @@
|
| }
|
| }
|
|
|
| - if (fWindowRectsState.enabled()) {
|
| - out->addWindowRectangles(fWindowRectsState);
|
| - }
|
| -
|
| return true;
|
| }
|
|
|
|
|