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

Side by Side Diff: tools/PictureRenderer.cpp

Issue 131343011: Initial QuadTree implementation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed SkScalar conversion issue Created 6 years, 10 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 | « tools/PictureRenderer.h ('k') | tools/PictureRenderingFlags.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 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 #include "PictureRenderer.h" 8 #include "PictureRenderer.h"
9 #include "picture_utils.h" 9 #include "picture_utils.h"
10 #include "SamplePipeControllers.h" 10 #include "SamplePipeControllers.h"
11 #include "SkBitmapHasher.h" 11 #include "SkBitmapHasher.h"
12 #include "SkCanvas.h" 12 #include "SkCanvas.h"
13 #include "SkData.h" 13 #include "SkData.h"
14 #include "SkDevice.h" 14 #include "SkDevice.h"
15 #include "SkDiscardableMemoryPool.h" 15 #include "SkDiscardableMemoryPool.h"
16 #include "SkGPipe.h" 16 #include "SkGPipe.h"
17 #if SK_SUPPORT_GPU 17 #if SK_SUPPORT_GPU
18 #include "gl/GrGLDefines.h" 18 #include "gl/GrGLDefines.h"
19 #include "SkGpuDevice.h" 19 #include "SkGpuDevice.h"
20 #endif 20 #endif
21 #include "SkGraphics.h" 21 #include "SkGraphics.h"
22 #include "SkImageEncoder.h" 22 #include "SkImageEncoder.h"
23 #include "SkMaskFilter.h" 23 #include "SkMaskFilter.h"
24 #include "SkMatrix.h" 24 #include "SkMatrix.h"
25 #include "SkPicture.h" 25 #include "SkPicture.h"
26 #include "SkPictureUtils.h" 26 #include "SkPictureUtils.h"
27 #include "SkPixelRef.h" 27 #include "SkPixelRef.h"
28 #include "SkQuadTree.h"
29 #include "SkQuadTreePicture.h"
28 #include "SkRTree.h" 30 #include "SkRTree.h"
29 #include "SkScalar.h" 31 #include "SkScalar.h"
30 #include "SkStream.h" 32 #include "SkStream.h"
31 #include "SkString.h" 33 #include "SkString.h"
32 #include "SkTemplates.h" 34 #include "SkTemplates.h"
33 #include "SkTileGridPicture.h" 35 #include "SkTileGridPicture.h"
34 #include "SkTDArray.h" 36 #include "SkTDArray.h"
35 #include "SkThreadUtils.h" 37 #include "SkThreadUtils.h"
36 #include "SkTypes.h" 38 #include "SkTypes.h"
37 39
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 bool sortDraws = false; 890 bool sortDraws = false;
889 return SkRTree::Create(kRTreeMinChildren, kRTreeMaxChildren, 891 return SkRTree::Create(kRTreeMinChildren, kRTreeMaxChildren,
890 aspectRatio, sortDraws); 892 aspectRatio, sortDraws);
891 } 893 }
892 }; 894 };
893 895
894 SkPicture* PictureRenderer::createPicture() { 896 SkPicture* PictureRenderer::createPicture() {
895 switch (fBBoxHierarchyType) { 897 switch (fBBoxHierarchyType) {
896 case kNone_BBoxHierarchyType: 898 case kNone_BBoxHierarchyType:
897 return SkNEW(SkPicture); 899 return SkNEW(SkPicture);
900 case kQuadTree_BBoxHierarchyType:
901 return SkNEW_ARGS(SkQuadTreePicture, (SkIRect::MakeWH(fPicture->widt h(),
902 fPicture->height())));
898 case kRTree_BBoxHierarchyType: 903 case kRTree_BBoxHierarchyType:
899 return SkNEW(RTreePicture); 904 return SkNEW(RTreePicture);
900 case kTileGrid_BBoxHierarchyType: 905 case kTileGrid_BBoxHierarchyType:
901 return SkNEW_ARGS(SkTileGridPicture, (fPicture->width(), 906 return SkNEW_ARGS(SkTileGridPicture, (fPicture->width(),
902 fPicture->height(), fGridInfo)); 907 fPicture->height(), fGridInfo));
903 } 908 }
904 SkASSERT(0); // invalid bbhType 909 SkASSERT(0); // invalid bbhType
905 return NULL; 910 return NULL;
906 } 911 }
907 912
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 virtual SkString getConfigNameInternal() SK_OVERRIDE { 952 virtual SkString getConfigNameInternal() SK_OVERRIDE {
948 return SkString("picture_clone"); 953 return SkString("picture_clone");
949 } 954 }
950 }; 955 };
951 956
952 PictureRenderer* CreatePictureCloneRenderer() { 957 PictureRenderer* CreatePictureCloneRenderer() {
953 return SkNEW(PictureCloneRenderer); 958 return SkNEW(PictureCloneRenderer);
954 } 959 }
955 960
956 } // namespace sk_tools 961 } // namespace sk_tools
OLDNEW
« no previous file with comments | « tools/PictureRenderer.h ('k') | tools/PictureRenderingFlags.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698