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

Side by Side Diff: bench/SKPBench.cpp

Issue 1034273002: Add matrix constructing helpers to SkMatrix (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « bench/PathBench.cpp ('k') | gm/aarectmodes.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 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 #include "SKPBench.h" 8 #include "SKPBench.h"
9 #include "SkCommandLineFlags.h" 9 #include "SkCommandLineFlags.h"
10 #include "SkMultiPictureDraw.h" 10 #include "SkMultiPictureDraw.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 mpd.draw(); 110 mpd.draw();
111 111
112 for (int j = 0; j < fTileRects.count(); ++j) { 112 for (int j = 0; j < fTileRects.count(); ++j) {
113 fSurfaces[j]->getCanvas()->flush(); 113 fSurfaces[j]->getCanvas()->flush();
114 } 114 }
115 } 115 }
116 } else { 116 } else {
117 for (int i = 0; i < loops; i++) { 117 for (int i = 0; i < loops; i++) {
118 for (int j = 0; j < fTileRects.count(); ++j) { 118 for (int j = 0; j < fTileRects.count(); ++j) {
119 SkMatrix trans; 119 const SkMatrix trans = SkMatrix::MakeTrans(-fTileRects[j].fLeft / fScale,
120 trans.setTranslate(-fTileRects[j].fLeft / fScale, 120 -fTileRects[j].fTop / fScale);
121 -fTileRects[j].fTop / fScale);
122 fSurfaces[j]->getCanvas()->drawPicture(fPic, &trans, NULL); 121 fSurfaces[j]->getCanvas()->drawPicture(fPic, &trans, NULL);
123 } 122 }
124 123
125 for (int j = 0; j < fTileRects.count(); ++j) { 124 for (int j = 0; j < fTileRects.count(); ++j) {
126 fSurfaces[j]->getCanvas()->flush(); 125 fSurfaces[j]->getCanvas()->flush();
127 } 126 }
128 } 127 }
129 } 128 }
130 } 129 }
OLDNEW
« no previous file with comments | « bench/PathBench.cpp ('k') | gm/aarectmodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698