aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleBigGradient.cpp
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2017-10-09 15:45:33 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-09 21:20:34 +0000
commit63fd760a37905c45d26fc3d49cac261fad1b4808 (patch)
tree279aa7293ea1773ac60230790868fe0e1fc725b0 /samplecode/SampleBigGradient.cpp
parenta49909aa24a370d6dff98d300d0c42ff8cd2c623 (diff)
Remove trailing whitespace.
Also adds a presubmit to prevent adding trailing whitespace to source code in the future. Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6 Reviewed-on: https://skia-review.googlesource.com/57380 Reviewed-by: Ravi Mistry <rmistry@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'samplecode/SampleBigGradient.cpp')
-rw-r--r--samplecode/SampleBigGradient.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/samplecode/SampleBigGradient.cpp b/samplecode/SampleBigGradient.cpp
index 9d850c905a..301c3d8a29 100644
--- a/samplecode/SampleBigGradient.cpp
+++ b/samplecode/SampleBigGradient.cpp
@@ -93,7 +93,7 @@ public:
void drawRect(const SkRect& r, SkColor c) override {
CGContextRef cg = (CGContextRef)fCanvas->accessTopRasterHandle();
-
+
CGColorRef color = CGColorCreateGenericRGB(SkColorGetR(c)/255.f,
SkColorGetG(c)/255.f,
SkColorGetB(c)/255.f,
@@ -121,7 +121,7 @@ static CGAffineTransform matrix_to_transform(CGContextRef cg, const SkMatrix& ct
class Allocator_CG : public SkRasterHandleAllocator {
public:
Allocator_CG() {}
-
+
bool allocHandle(const SkImageInfo& info, Rec* rec) override {
// let CG allocate the pixels
CGContextRef cg = SkCreateCGContext(SkPixmap(info, nullptr, 0));
@@ -139,7 +139,7 @@ public:
void updateHandle(Handle hndl, const SkMatrix& ctm, const SkIRect& clip) override {
CGContextRef cg = (CGContextRef)hndl;
-
+
CGContextRestoreGState(cg);
CGContextSaveGState(cg);
CGContextClipToRect(cg, CGRectMake(clip.x(), clip.y(), clip.width(), clip.height()));
@@ -282,7 +282,7 @@ protected:
port->drawRect({0, 0, 30, 30}, SK_ColorBLUE);
port->drawOval({10, 10, 20, 20}, SK_ColorWHITE);
port->restore();
-
+
port->saveLayer({50, 50, 100, 100}, 0x80);
port->drawRect({55, 55, 95, 95}, SK_ColorGREEN);
port->restore();