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

Side by Side Diff: gm/aaclip.cpp

Issue 221953002: resize canvas for GM + typo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: code rebase Created 6 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 | « expectations/gm/ignored-tests.txt ('k') | gm/composeshader.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 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 AAClipGM() { 69 AAClipGM() {
70 70
71 } 71 }
72 72
73 protected: 73 protected:
74 virtual SkString onShortName() SK_OVERRIDE { 74 virtual SkString onShortName() SK_OVERRIDE {
75 return SkString("aaclip"); 75 return SkString("aaclip");
76 } 76 }
77 77
78 virtual SkISize onISize() SK_OVERRIDE { 78 virtual SkISize onISize() SK_OVERRIDE {
79 return SkISize::Make(640, 480); 79 return SkISize::Make(240, 120);
80 } 80 }
81 81
82 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 82 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
83 // Initial pixel-boundary-aligned draw 83 // Initial pixel-boundary-aligned draw
84 draw_rect_tests(canvas); 84 draw_rect_tests(canvas);
85 85
86 // Repeat 4x with .2, .4, .6, .8 px offsets 86 // Repeat 4x with .2, .4, .6, .8 px offsets
87 canvas->translate(SK_Scalar1 / 5, SK_Scalar1 / 5); 87 canvas->translate(SK_Scalar1 / 5, SK_Scalar1 / 5);
88 canvas->translate(SkIntToScalar(50), 0); 88 canvas->translate(SkIntToScalar(50), 0);
89 draw_rect_tests(canvas); 89 draw_rect_tests(canvas);
(...skipping 11 matching lines...) Expand all
101 draw_rect_tests(canvas); 101 draw_rect_tests(canvas);
102 } 102 }
103 103
104 virtual uint32_t onGetFlags() const { return kSkipPipe_Flag; } 104 virtual uint32_t onGetFlags() const { return kSkipPipe_Flag; }
105 105
106 private: 106 private:
107 typedef skiagm::GM INHERITED; 107 typedef skiagm::GM INHERITED;
108 }; 108 };
109 109
110 DEF_GM( return SkNEW(AAClipGM); ) 110 DEF_GM( return SkNEW(AAClipGM); )
OLDNEW
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | gm/composeshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698