OLD | NEW |
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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 173 } |
174 | 174 |
175 void draw(SkCanvas* canvas, SkPaint* paint) { | 175 void draw(SkCanvas* canvas, SkPaint* paint) { |
176 canvas->drawVertices(SkCanvas::kTriangleFan_VertexMode, 4, fPts, fPts, | 176 canvas->drawVertices(SkCanvas::kTriangleFan_VertexMode, 4, fPts, fPts, |
177 NULL, NULL, NULL, 0, *paint); | 177 NULL, NULL, NULL, 0, *paint); |
178 } | 178 } |
179 }; | 179 }; |
180 | 180 |
181 #include "SkImageEncoder.h" | 181 #include "SkImageEncoder.h" |
182 static void save_bm(const SkBitmap& bm, const char name[]) { | 182 static void save_bm(const SkBitmap& bm, const char name[]) { |
183 SkImageEncoder::EncodeFile(name, bm, SkImageEncoder::kPNG_Type, 100); | 183 SkImageEncoder::EncodeFile(name, bm, kPNG_SkEncodedFormat, 100); |
184 } | 184 } |
185 | 185 |
186 static bool gOnce; | 186 static bool gOnce; |
187 | 187 |
188 // Make sure our blits are invariant with the width of the blit (i.e. that | 188 // Make sure our blits are invariant with the width of the blit (i.e. that |
189 // special case for 8 at a time have the same results as narrower blits) | 189 // special case for 8 at a time have the same results as narrower blits) |
190 static void test_diagonal(skiatest::Reporter* reporter) { | 190 static void test_diagonal(skiatest::Reporter* reporter) { |
191 static const int W = 64; | 191 static const int W = 64; |
192 static const int H = W; | 192 static const int H = W; |
193 | 193 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 } | 255 } |
256 } | 256 } |
257 } | 257 } |
258 } | 258 } |
259 } | 259 } |
260 | 260 |
261 DEF_TEST(BlitRow, reporter) { | 261 DEF_TEST(BlitRow, reporter) { |
262 test_00_FF(reporter); | 262 test_00_FF(reporter); |
263 test_diagonal(reporter); | 263 test_diagonal(reporter); |
264 } | 264 } |
OLD | NEW |