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

Side by Side Diff: gm/imagemakewithfilter.cpp

Issue 2003453003: Adjust size of imagemakewithfilter GM. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * 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
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkBlurImageFilter.h" 9 #include "SkBlurImageFilter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 23 matching lines...) Expand all
34 // given offset. 34 // given offset.
35 class ImageMakeWithFilterGM : public skiagm::GM { 35 class ImageMakeWithFilterGM : public skiagm::GM {
36 public: 36 public:
37 ImageMakeWithFilterGM () {} 37 ImageMakeWithFilterGM () {}
38 38
39 protected: 39 protected:
40 SkString onShortName() override { 40 SkString onShortName() override {
41 return SkString("imagemakewithfilter"); 41 return SkString("imagemakewithfilter");
42 } 42 }
43 43
44 SkISize onISize() override { return SkISize::Make(320, 100); } 44 SkISize onISize() override { return SkISize::Make(440, 530); }
45 45
46 void onDraw(SkCanvas* canvas) override { 46 void onDraw(SkCanvas* canvas) override {
47 auto cf = SkColorFilter::MakeModeFilter(SK_ColorGREEN, SkXfermode::kSrc_ Mode); 47 auto cf = SkColorFilter::MakeModeFilter(SK_ColorGREEN, SkXfermode::kSrc_ Mode);
48 sk_sp<SkImageFilter> filters[] = { 48 sk_sp<SkImageFilter> filters[] = {
49 SkColorFilterImageFilter::Make(std::move(cf), nullptr), 49 SkColorFilterImageFilter::Make(std::move(cf), nullptr),
50 SkBlurImageFilter::Make(2.0f, 2.0f, nullptr), 50 SkBlurImageFilter::Make(2.0f, 2.0f, nullptr),
51 SkDropShadowImageFilter::Make( 51 SkDropShadowImageFilter::Make(
52 10.0f, 5.0f, 3.0f, 3.0f, SK_ColorBLUE, 52 10.0f, 5.0f, 3.0f, 3.0f, SK_ColorBLUE,
53 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode, 53 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode,
54 nullptr), 54 nullptr),
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 canvas->restore(); 95 canvas->restore();
96 canvas->translate(0, DY); 96 canvas->translate(0, DY);
97 } 97 }
98 } 98 }
99 99
100 private: 100 private:
101 typedef GM INHERITED; 101 typedef GM INHERITED;
102 }; 102 };
103 DEF_GM( return new ImageMakeWithFilterGM; ) 103 DEF_GM( return new ImageMakeWithFilterGM; )
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698