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

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

Issue 465523002: De-parameterize SkNextDatumFunction. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: no <T> Created 6 years, 4 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 | « no previous file | src/core/SkTileGrid.h » ('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 "SkBBHFactory.h" 8 #include "SkBBHFactory.h"
9 #include "SkPictureStateTree.h"
10 #include "SkQuadTree.h" 9 #include "SkQuadTree.h"
11 #include "SkRTree.h" 10 #include "SkRTree.h"
12 #include "SkTileGrid.h" 11 #include "SkTileGrid.h"
13 12
14 13
15 SkBBoxHierarchy* SkQuadTreeFactory::operator()(int width, int height) const { 14 SkBBoxHierarchy* SkQuadTreeFactory::operator()(int width, int height) const {
16 return SkNEW_ARGS(SkQuadTree, (SkIRect::MakeWH(width, height))); 15 return SkNEW_ARGS(SkQuadTree, (SkIRect::MakeWH(width, height)));
17 } 16 }
18 17
19 SkBBoxHierarchy* SkRTreeFactory::operator()(int width, int height) const { 18 SkBBoxHierarchy* SkRTreeFactory::operator()(int width, int height) const {
(...skipping 12 matching lines...) Expand all
32 31
33 SkBBoxHierarchy* SkTileGridFactory::operator()(int width, int height) const { 32 SkBBoxHierarchy* SkTileGridFactory::operator()(int width, int height) const {
34 SkASSERT(fInfo.fMargin.width() >= 0); 33 SkASSERT(fInfo.fMargin.width() >= 0);
35 SkASSERT(fInfo.fMargin.height() >= 0); 34 SkASSERT(fInfo.fMargin.height() >= 0);
36 // Note: SkIRects are non-inclusive of the right() column and bottom() row. 35 // Note: SkIRects are non-inclusive of the right() column and bottom() row.
37 // For example, an SkIRect at 0,0 with a size of (1,1) will only have 36 // For example, an SkIRect at 0,0 with a size of (1,1) will only have
38 // content at pixel (0,0) and will report left=0 and right=1, hence the 37 // content at pixel (0,0) and will report left=0 and right=1, hence the
39 // "-1"s below. 38 // "-1"s below.
40 int xTileCount = (width + fInfo.fTileInterval.width() - 1) / fInfo.fTileInte rval.width(); 39 int xTileCount = (width + fInfo.fTileInterval.width() - 1) / fInfo.fTileInte rval.width();
41 int yTileCount = (height + fInfo.fTileInterval.height() - 1) / fInfo.fTileIn terval.height(); 40 int yTileCount = (height + fInfo.fTileInterval.height() - 1) / fInfo.fTileIn terval.height();
42 return SkNEW_ARGS(SkTileGrid, (xTileCount, yTileCount, fInfo, 41 return SkNEW_ARGS(SkTileGrid, (xTileCount, yTileCount, fInfo));
43 SkTileGridNextDatum<SkPictureStateTree::Draw >));
44 } 42 }
OLDNEW
« no previous file with comments | « no previous file | src/core/SkTileGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698