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

Commit 21c9c855 authored by Romain Guy's avatar Romain Guy
Browse files

Fix the system

Change-Id: Ie097ea5d6c0af9c5929b8c5deb76b4824d5de787
parent 967e2bf3
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;
}