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

Side by Side Diff: tests/BlitRowTest.cpp

Issue 18666004: ARM Skia NEON patches - 01 - Simple fixes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | « src/opts/SkBlitRow_opts_arm_neon.cpp ('k') | tests/DrawBitmapRectTest.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 } 160 }
161 } 161 }
162 } 162 }
163 } 163 }
164 164
165 /////////////////////////////////////////////////////////////////////////////// 165 ///////////////////////////////////////////////////////////////////////////////
166 166
167 struct Mesh { 167 struct Mesh {
168 SkPoint fPts[4]; 168 SkPoint fPts[4];
169 uint16_t fIndices[6];
170 169
171 Mesh(const SkBitmap& bm, SkPaint* paint) { 170 Mesh(const SkBitmap& bm, SkPaint* paint) {
172 const SkScalar w = SkIntToScalar(bm.width()); 171 const SkScalar w = SkIntToScalar(bm.width());
173 const SkScalar h = SkIntToScalar(bm.height()); 172 const SkScalar h = SkIntToScalar(bm.height());
174 fPts[0].set(0, 0); 173 fPts[0].set(0, 0);
175 fPts[1].set(w, 0); 174 fPts[1].set(w, 0);
176 fPts[2].set(w, h); 175 fPts[2].set(w, h);
177 fPts[3].set(0, h); 176 fPts[3].set(0, h);
178 SkShader* s = SkShader::CreateBitmapShader(bm, SkShader::kClamp_TileMode , 177 SkShader* s = SkShader::CreateBitmapShader(bm, SkShader::kClamp_TileMode ,
179 SkShader::kClamp_TileMode); 178 SkShader::kClamp_TileMode);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 266 }
268 } 267 }
269 268
270 static void TestBlitRow(skiatest::Reporter* reporter) { 269 static void TestBlitRow(skiatest::Reporter* reporter) {
271 test_00_FF(reporter); 270 test_00_FF(reporter);
272 test_diagonal(reporter); 271 test_diagonal(reporter);
273 } 272 }
274 273
275 #include "TestClassDef.h" 274 #include "TestClassDef.h"
276 DEFINE_TESTCLASS("BlitRow", TestBlitRowClass, TestBlitRow) 275 DEFINE_TESTCLASS("BlitRow", TestBlitRowClass, TestBlitRow)
OLDNEW
« no previous file with comments | « src/opts/SkBlitRow_opts_arm_neon.cpp ('k') | tests/DrawBitmapRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698