From ab2f44cbfab6d2e0e09c93c41932f464a061742d Mon Sep 17 00:00:00 2001 From: joshualitt Date: Tue, 24 Feb 2015 06:47:14 -0800 Subject: [PATCH] probable fix for asan bot NOTREECHECKS=True TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/956583002 --- include/gpu/GrClip.h | 1 + src/gpu/GrClip.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/gpu/GrClip.h b/include/gpu/GrClip.h index ba26d5c081..76cb46e312 100644 --- a/include/gpu/GrClip.h +++ b/include/gpu/GrClip.h @@ -93,6 +93,7 @@ public: } void setClipStack(const SkClipStack* clipStack, const SkIPoint* origin = NULL) { + this->reset(); if (clipStack->isWideOpen()) { fClipType = kWideOpen_ClipType; fOrigin.setZero(); diff --git a/src/gpu/GrClip.cpp b/src/gpu/GrClip.cpp index 15b1fbc811..1dc6edc168 100644 --- a/src/gpu/GrClip.cpp +++ b/src/gpu/GrClip.cpp @@ -50,6 +50,6 @@ void GrClip::getConservativeBounds(int width, int height, SkIRect* devResult, } const GrClip& GrClip::WideOpen() { - static GrClip clip; + static const GrClip clip; return clip; }