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

Side by Side Diff: gm/pathinterior.cpp

Issue 1263553002: make pixelsnap textblob* etc gm portable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add more 565 compatibility Created 5 years, 4 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 | « gm/ovals.cpp ('k') | gm/pictureshader.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 2012 Google Inc. 2 * Copyright 2012 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 "SkGraphics.h" 10 #include "SkGraphics.h"
(...skipping 26 matching lines...) Expand all
37 SkPaint paint; 37 SkPaint paint;
38 paint.setAntiAlias(true); 38 paint.setAntiAlias(true);
39 39
40 SkRect rect; 40 SkRect rect;
41 #if 0 41 #if 0
42 bool hasInterior = path.hasRectangularInterior(&rect); 42 bool hasInterior = path.hasRectangularInterior(&rect);
43 #else 43 #else
44 bool hasInterior = false; 44 bool hasInterior = false;
45 #endif 45 #endif
46 46
47 paint.setColor(hasInterior ? 0xFF8888FF : SK_ColorGRAY); 47 paint.setColor(sk_tool_utils::color_to_565(hasInterior ? 0xFF8888FF : SK _ColorGRAY));
48 canvas->drawPath(path, paint); 48 canvas->drawPath(path, paint);
49 paint.setStyle(SkPaint::kStroke_Style); 49 paint.setStyle(SkPaint::kStroke_Style);
50 paint.setColor(SK_ColorRED); 50 paint.setColor(SK_ColorRED);
51 canvas->drawPath(path, paint); 51 canvas->drawPath(path, paint);
52 52
53 if (hasInterior) { 53 if (hasInterior) {
54 paint.setStyle(SkPaint::kFill_Style); 54 paint.setStyle(SkPaint::kFill_Style);
55 paint.setColor(0x8800FF00); 55 paint.setColor(0x8800FF00);
56 canvas->drawRect(rect, paint); 56 canvas->drawRect(rect, paint);
57 } 57 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 private: 105 private:
106 106
107 typedef GM INHERITED; 107 typedef GM INHERITED;
108 }; 108 };
109 109
110 ////////////////////////////////////////////////////////////////////////////// 110 //////////////////////////////////////////////////////////////////////////////
111 111
112 static skiagm::GM* MyFactory(void*) { return new PathInteriorGM; } 112 static skiagm::GM* MyFactory(void*) { return new PathInteriorGM; }
113 static skiagm::GMRegistry reg(MyFactory); 113 static skiagm::GMRegistry reg(MyFactory);
OLDNEW
« no previous file with comments | « gm/ovals.cpp ('k') | gm/pictureshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698