Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28587f44 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Fix the system"

parents ed219c11 21c9c855
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -43,6 +43,8 @@ Snapshot::Snapshot(const sp<Snapshot>& s, int saveFlags):
        invisible(s->invisible), empty(false),
        viewport(s->viewport), height(s->height) {

    clipRegion = NULL;

    if (saveFlags & SkCanvas::kMatrix_SaveFlag) {
        mTransformRoot.load(*s->transform);
        transform = &mTransformRoot;
@@ -57,11 +59,7 @@ Snapshot::Snapshot(const sp<Snapshot>& s, int saveFlags):
        if (s->clipRegion) {
            mClipRegionRoot.merge(*s->clipRegion);
            clipRegion = &mClipRegionRoot;
        } else {
            clipRegion = NULL;
        }
#else
        clipRegion = NULL;
#endif
    } else {
        clipRect = s->clipRect;
@@ -213,10 +211,12 @@ bool Snapshot::clipTransformed(const Rect& r, SkRegion::Op op) {

void Snapshot::setClip(float left, float top, float right, float bottom) {
    clipRect->set(left, top, right, bottom);
#if STENCIL_BUFFER_SIZE
    if (clipRegion) {
        clipRegion->clear();
        clipRegion = NULL;
    }
#endif
    flags |= Snapshot::kFlagClipSet;
}