Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: samplecode/SampleLighting.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « samplecode/SampleLayers.cpp ('k') | samplecode/SampleManyRects.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1
2 /* 1 /*
3 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
4 * 3 *
5 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 #include "DecodeFile.h" 7 #include "DecodeFile.h"
9 #include "SampleCode.h" 8 #include "SampleCode.h"
10 #include "Resources.h" 9 #include "Resources.h"
11 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 63 }
65 64
66 SkAutoTUnref<const SkLightingShader::Lights> lights(create_lights(fLight Angle, 65 SkAutoTUnref<const SkLightingShader::Lights> lights(create_lights(fLight Angle,
67 fColor Factor)); 66 fColor Factor));
68 SkPaint paint; 67 SkPaint paint;
69 paint.setShader(SkLightingShader::Make(fDiffuseBitmap, fNormalBitmap, 68 paint.setShader(SkLightingShader::Make(fDiffuseBitmap, fNormalBitmap,
70 lights, SkVector::Make(1.0f, 0.0f ), 69 lights, SkVector::Make(1.0f, 0.0f ),
71 nullptr, nullptr)); 70 nullptr, nullptr));
72 paint.setColor(SK_ColorBLACK); 71 paint.setColor(SK_ColorBLACK);
73 72
74 SkRect r = SkRect::MakeWH((SkScalar)fDiffuseBitmap.width(), 73 SkRect r = SkRect::MakeWH((SkScalar)fDiffuseBitmap.width(),
75 (SkScalar)fDiffuseBitmap.height()); 74 (SkScalar)fDiffuseBitmap.height());
76 canvas->drawRect(r, paint); 75 canvas->drawRect(r, paint);
77 76
78 // so we're constantly updating 77 // so we're constantly updating
79 this->inval(nullptr); 78 this->inval(nullptr);
80 } 79 }
81 80
82 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) ove rride { 81 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) ove rride {
83 this->inval(nullptr); 82 this->inval(nullptr);
84 return this->INHERITED::onFindClickHandler(x, y, modi); 83 return this->INHERITED::onFindClickHandler(x, y, modi);
85 } 84 }
86 85
87 private: 86 private:
88 typedef SampleView INHERITED; 87 typedef SampleView INHERITED;
89 }; 88 };
90 89
91 ////////////////////////////////////////////////////////////////////////////// 90 //////////////////////////////////////////////////////////////////////////////
92 91
93 static SkView* MyFactory() { return new LightingView; } 92 static SkView* MyFactory() { return new LightingView; }
94 static SkViewRegister reg(MyFactory); 93 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleLayers.cpp ('k') | samplecode/SampleManyRects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698