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

Side by Side Diff: src/core/SkTileGrid.cpp

Issue 238273012: Staged removal of SkPicture-derived classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: have SkPicture only friend SkPictureRecorder once 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 | « src/core/SkTileGrid.h ('k') | src/core/SkTileGridPicture.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 2012 Google Inc. 3 * Copyright 2012 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 8
9 #include "SkTileGrid.h" 9 #include "SkTileGrid.h"
10 10
11 SkTileGrid::SkTileGrid(int xTileCount, int yTileCount, const SkTileGridPicture:: TileGridInfo& info, 11 SkTileGrid::SkTileGrid(int xTileCount, int yTileCount, const SkTileGridFactory:: TileGridInfo& info,
12 SkTileGridNextDatumFunctionPtr nextDatumFunction) 12 SkTileGridNextDatumFunctionPtr nextDatumFunction) {
13 {
14 fXTileCount = xTileCount; 13 fXTileCount = xTileCount;
15 fYTileCount = yTileCount; 14 fYTileCount = yTileCount;
16 fInfo = info; 15 fInfo = info;
17 // Margin is offset by 1 as a provision for AA and 16 // Margin is offset by 1 as a provision for AA and
18 // to cancel-out the outset applied by getClipDeviceBounds. 17 // to cancel-out the outset applied by getClipDeviceBounds.
19 fInfo.fMargin.fHeight++; 18 fInfo.fMargin.fHeight++;
20 fInfo.fMargin.fWidth++; 19 fInfo.fMargin.fWidth++;
21 fTileCount = fXTileCount * fYTileCount; 20 fTileCount = fXTileCount * fYTileCount;
22 fInsertionCount = 0; 21 fInsertionCount = 0;
23 fGridBounds = SkIRect::MakeXYWH(0, 0, fInfo.fTileInterval.width() * fXTileCo unt, 22 fGridBounds = SkIRect::MakeXYWH(0, 0, fInfo.fTileInterval.width() * fXTileCo unt,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 123 }
125 124
126 void SkTileGrid::rewindInserts() { 125 void SkTileGrid::rewindInserts() {
127 SkASSERT(fClient); 126 SkASSERT(fClient);
128 for (int i = 0; i < fTileCount; ++i) { 127 for (int i = 0; i < fTileCount; ++i) {
129 while (!fTileData[i].isEmpty() && fClient->shouldRewind(fTileData[i].top ())) { 128 while (!fTileData[i].isEmpty() && fClient->shouldRewind(fTileData[i].top ())) {
130 fTileData[i].pop(); 129 fTileData[i].pop();
131 } 130 }
132 } 131 }
133 } 132 }
OLDNEW
« no previous file with comments | « src/core/SkTileGrid.h ('k') | src/core/SkTileGridPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698