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

Side by Side Diff: include/core/SkBBHFactory.h

Issue 243173002: Staging for cleanup of SkPicture-related headers (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Add crucial newline at end of file 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 | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkPicture.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkBBHFactory_DEFINED
9 #define SkBBHFactory_DEFINED
10
11 #include "SkSize.h"
12 #include "SkPoint.h"
13
14 class SkBBoxHierarchy;
15
16 class SkBBHFactory {
17 public:
18 /**
19 * Allocate a new SkBBoxHierarchy. Return NULL on failure.
20 */
21 virtual SkBBoxHierarchy* operator()(int width, int height) const = 0;
22 virtual ~SkBBHFactory() {};
23 };
24
25 class SkQuadTreeFactory : public SkBBHFactory {
26 public:
27 virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE ;
28 private:
29 typedef SkBBHFactory INHERITED;
30 };
31
32
33 class SkRTreeFactory : public SkBBHFactory {
34 public:
35 virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE ;
36 private:
37 typedef SkBBHFactory INHERITED;
38 };
39
40 class SkTileGridFactory : public SkBBHFactory {
41 public:
42 struct TileGridInfo {
43 /** Tile placement interval */
44 SkISize fTileInterval;
45
46 /** Pixel coverage overlap between adjacent tiles */
47 SkISize fMargin;
48
49 /** Offset added to device-space bounding box positions to convert
50 * them to tile-grid space. This can be used to adjust the "phase"
51 * of the tile grid to match probable query rectangles that will be
52 * used to search into the tile grid. As long as the offset is smaller
53 * or equal to the margin, there is no need to extend the domain of
54 * the tile grid to prevent data loss.
55 */
56 SkIPoint fOffset;
57 };
58
59 SkTileGridFactory(const TileGridInfo& info) : fInfo(info) { }
60
61 virtual SkBBoxHierarchy* operator()(int width, int height) const SK_OVERRIDE ;
62
63 private:
64 TileGridInfo fInfo;
65
66 typedef SkBBHFactory INHERITED;
67 };
68
69 #endif
OLDNEW
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkPicture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698