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

Side by Side Diff: gm/blurs.cpp

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
11 11
12 namespace skiagm { 12 namespace skiagm {
13 13
14 class BlursGM : public GM { 14 class BlursGM : public GM {
15 public: 15 public:
16 BlursGM() { 16 BlursGM() {
17 this->setBGColor(0xFFDDDDDD); 17 this->setBGColor(0xFFDDDDDD);
18 } 18 }
19 19
20 protected: 20 protected:
21 #ifdef SK_SCALAR_IS_FIXED
22 virtual uint32_t onGetFlags() const SK_OVERRIDE {
23 // SkCanvas::drawCircle, used by this test, performs a quick reject.
24 // The large size given to the device used by SkGPipeCanvas means that
25 // the device clip will not be set properly and circles will be
26 // rejected when in FIXED.
27 return this->INHERITED::onGetFlags() | GM::kSkipPipe_Flag;
28 }
29 #endif
30
31 virtual SkString onShortName() { 21 virtual SkString onShortName() {
32 return SkString("blurs"); 22 return SkString("blurs");
33 } 23 }
34 24
35 virtual SkISize onISize() { 25 virtual SkISize onISize() {
36 return make_isize(700, 500); 26 return make_isize(700, 500);
37 } 27 }
38 28
39 virtual void onDraw(SkCanvas* canvas) { 29 virtual void onDraw(SkCanvas* canvas) {
40 SkBlurMaskFilter::BlurStyle NONE = SkBlurMaskFilter::BlurStyle(-999); 30 SkBlurMaskFilter::BlurStyle NONE = SkBlurMaskFilter::BlurStyle(-999);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 private: 89 private:
100 typedef GM INHERITED; 90 typedef GM INHERITED;
101 }; 91 };
102 92
103 ////////////////////////////////////////////////////////////////////////////// 93 //////////////////////////////////////////////////////////////////////////////
104 94
105 static GM* MyFactory(void*) { return new BlursGM; } 95 static GM* MyFactory(void*) { return new BlursGM; }
106 static GMRegistry reg(MyFactory); 96 static GMRegistry reg(MyFactory);
107 97
108 } 98 }
OLDNEW
« no previous file with comments | « experimental/SkSetPoly3To3_A.cpp ('k') | gyp/SampleApp.gyp » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698