From 5d9ab2816f5e595a5b7cba9d4b7fae169e21c66e Mon Sep 17 00:00:00 2001 From: reed Date: Fri, 19 Sep 2014 13:04:17 -0700 Subject: enable conservative clips for gpudevice TBR=bsalomon Author: reed@google.com Review URL: https://codereview.chromium.org/587793003 --- samplecode/SampleApp.cpp | 6 ++++++ src/gpu/SkGpuDevice.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index 08e7240f98..6ca67bcbcd 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -1407,7 +1407,13 @@ void SampleWindow::beforeChild(SkView* child, SkCanvas* canvas) { t = SkScalarMul(SkScalarDiv(t, gAnimPeriod), gAnimMag); SkMatrix m; m.reset(); +#if 1 m.setPerspY(t); +#else + m.setPerspY(SK_Scalar1 / 1000); + m.setSkewX(SkScalarDiv(8, 25)); + m.dump(); +#endif canvas->concat(m); } diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h index 419013f4ae..dc59009dae 100644 --- a/src/gpu/SkGpuDevice.h +++ b/src/gpu/SkGpuDevice.h @@ -154,7 +154,7 @@ private: virtual SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE; // temporarily change the return to false, until we understand the issues with filters and persp - virtual bool forceConservativeRasterClip() const SK_OVERRIDE { return false; } + virtual bool forceConservativeRasterClip() const SK_OVERRIDE { return true; } // sets the render target, clip, and matrix on GrContext. Use forceIdenity to override // SkDraw's matrix and draw in device coords. -- cgit v1.2.3