OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef PictureRenderer_DEFINED | 8 #ifndef PictureRenderer_DEFINED |
9 #define PictureRenderer_DEFINED | 9 #define PictureRenderer_DEFINED |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 kMesa_DeviceType, | 73 kMesa_DeviceType, |
74 #endif | 74 #endif |
75 kBitmap_DeviceType, | 75 kBitmap_DeviceType, |
76 #if SK_SUPPORT_GPU | 76 #if SK_SUPPORT_GPU |
77 kGPU_DeviceType, | 77 kGPU_DeviceType, |
78 #endif | 78 #endif |
79 }; | 79 }; |
80 | 80 |
81 enum BBoxHierarchyType { | 81 enum BBoxHierarchyType { |
82 kNone_BBoxHierarchyType = 0, | 82 kNone_BBoxHierarchyType = 0, |
| 83 kQuadTree_BBoxHierarchyType, |
83 kRTree_BBoxHierarchyType, | 84 kRTree_BBoxHierarchyType, |
84 kTileGrid_BBoxHierarchyType, | 85 kTileGrid_BBoxHierarchyType, |
85 }; | 86 }; |
86 | 87 |
87 // this uses SkPaint::Flags as a base and adds additional flags | 88 // this uses SkPaint::Flags as a base and adds additional flags |
88 enum DrawFilterFlags { | 89 enum DrawFilterFlags { |
89 kNone_DrawFilterFlag = 0, | 90 kNone_DrawFilterFlag = 0, |
90 kHinting_DrawFilterFlag = 0x10000, // toggles between no hinting and nor
mal hinting | 91 kHinting_DrawFilterFlag = 0x10000, // toggles between no hinting and nor
mal hinting |
91 kSlightHinting_DrawFilterFlag = 0x20000, // toggles between slight and n
ormal hinting | 92 kSlightHinting_DrawFilterFlag = 0x20000, // toggles between slight and n
ormal hinting |
92 kAAClip_DrawFilterFlag = 0x40000, // toggles between soft and hard clip | 93 kAAClip_DrawFilterFlag = 0x40000, // toggles between soft and hard clip |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 SkString getConfigName() { | 241 SkString getConfigName() { |
241 SkString config = this->getConfigNameInternal(); | 242 SkString config = this->getConfigNameInternal(); |
242 if (!fViewport.isEmpty()) { | 243 if (!fViewport.isEmpty()) { |
243 config.appendf("_viewport_%ix%i", fViewport.width(), fViewport.heigh
t()); | 244 config.appendf("_viewport_%ix%i", fViewport.width(), fViewport.heigh
t()); |
244 } | 245 } |
245 if (fScaleFactor != SK_Scalar1) { | 246 if (fScaleFactor != SK_Scalar1) { |
246 config.appendf("_scalar_%f", SkScalarToFloat(fScaleFactor)); | 247 config.appendf("_scalar_%f", SkScalarToFloat(fScaleFactor)); |
247 } | 248 } |
248 if (kRTree_BBoxHierarchyType == fBBoxHierarchyType) { | 249 if (kRTree_BBoxHierarchyType == fBBoxHierarchyType) { |
249 config.append("_rtree"); | 250 config.append("_rtree"); |
| 251 } else if (kQuadTree_BBoxHierarchyType == fBBoxHierarchyType) { |
| 252 config.append("_quadtree"); |
250 } else if (kTileGrid_BBoxHierarchyType == fBBoxHierarchyType) { | 253 } else if (kTileGrid_BBoxHierarchyType == fBBoxHierarchyType) { |
251 config.append("_grid"); | 254 config.append("_grid"); |
252 } | 255 } |
253 #if SK_SUPPORT_GPU | 256 #if SK_SUPPORT_GPU |
254 switch (fDeviceType) { | 257 switch (fDeviceType) { |
255 case kGPU_DeviceType: | 258 case kGPU_DeviceType: |
256 if (fSampleCount) { | 259 if (fSampleCount) { |
257 config.appendf("_msaa%d", fSampleCount); | 260 config.appendf("_msaa%d", fSampleCount); |
258 } else { | 261 } else { |
259 config.append("_gpu"); | 262 config.append("_gpu"); |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 | 611 |
609 typedef PictureRenderer INHERITED; | 612 typedef PictureRenderer INHERITED; |
610 }; | 613 }; |
611 | 614 |
612 extern PictureRenderer* CreateGatherPixelRefsRenderer(); | 615 extern PictureRenderer* CreateGatherPixelRefsRenderer(); |
613 extern PictureRenderer* CreatePictureCloneRenderer(); | 616 extern PictureRenderer* CreatePictureCloneRenderer(); |
614 | 617 |
615 } | 618 } |
616 | 619 |
617 #endif // PictureRenderer_DEFINED | 620 #endif // PictureRenderer_DEFINED |
OLD | NEW |