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

Side by Side Diff: gm/discard.cpp

Issue 257693002: Fix int->scalar warning on windows (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 | Annotate | Revision Log
« 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 2014 Google Inc. 2 * Copyright 2014 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 #if SK_SUPPORT_GPU 8 #if SK_SUPPORT_GPU
9 9
10 #include "gm.h" 10 #include "gm.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 case 1: 67 case 1:
68 surface->getCanvas()->clear(color); 68 surface->getCanvas()->clear(color);
69 break; 69 break;
70 case 2: 70 case 2:
71 SkColorShader shader(color); 71 SkColorShader shader(color);
72 SkPaint paint; 72 SkPaint paint;
73 paint.setShader(&shader); 73 paint.setShader(&shader);
74 surface->getCanvas()->drawPaint(paint); 74 surface->getCanvas()->drawPaint(paint);
75 break; 75 break;
76 } 76 }
77 surface->draw(canvas, 10*x, 10*y, NULL); 77 surface->draw(canvas, 10.f*x, 10.f*y, NULL);
78 } 78 }
79 } 79 }
80 80
81 surface->getCanvas()->discard(); 81 surface->getCanvas()->discard();
82 surface->unref(); 82 surface->unref();
83 } 83 }
84 84
85 private: 85 private:
86 typedef GM INHERITED; 86 typedef GM INHERITED;
87 }; 87 };
88 88
89 ////////////////////////////////////////////////////////////////////////////// 89 //////////////////////////////////////////////////////////////////////////////
90 90
91 DEF_GM( return SkNEW(DiscardGM); ) 91 DEF_GM( return SkNEW(DiscardGM); )
92 92
93 } // end namespace 93 } // end namespace
94 94
95 #endif 95 #endif
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