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

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

Issue 977413003: Revert of Update SkPicture cull rects with RTree information (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « src/core/SkBBoxHierarchy.h ('k') | src/core/SkRTree.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 "SkData.h" 8 #include "SkData.h"
9 #include "SkDrawable.h" 9 #include "SkDrawable.h"
10 #include "SkLayerInfo.h" 10 #include "SkLayerInfo.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 SkDrawableList* drawableList = fRecorder->getDrawableList(); 54 SkDrawableList* drawableList = fRecorder->getDrawableList();
55 SkPicture::SnapshotArray* pictList = drawableList ? drawableList->newDrawabl eSnapshot() : NULL; 55 SkPicture::SnapshotArray* pictList = drawableList ? drawableList->newDrawabl eSnapshot() : NULL;
56 56
57 if (fBBH.get()) { 57 if (fBBH.get()) {
58 if (saveLayerData) { 58 if (saveLayerData) {
59 SkRecordComputeLayers(fCullRect, *fRecord, pictList, fBBH.get(), sav eLayerData); 59 SkRecordComputeLayers(fCullRect, *fRecord, pictList, fBBH.get(), sav eLayerData);
60 } else { 60 } else {
61 SkRecordFillBounds(fCullRect, *fRecord, fBBH.get()); 61 SkRecordFillBounds(fCullRect, *fRecord, fBBH.get());
62 } 62 }
63 SkRect bbhBound = fBBH->getRootBound();
64 SkASSERT((bbhBound.isEmpty() || fCullRect.contains(bbhBound))
65 || (bbhBound.isEmpty() && fCullRect.isEmpty()));
66 fCullRect = bbhBound;
67 } 63 }
68 64
69 SkPicture* pict = SkNEW_ARGS(SkPicture, (fCullRect, fRecord, pictList, fBBH) ); 65 SkPicture* pict = SkNEW_ARGS(SkPicture, (fCullRect, fRecord, pictList, fBBH) );
70 66
71 if (saveLayerData) { 67 if (saveLayerData) {
72 pict->EXPERIMENTAL_addAccelData(saveLayerData); 68 pict->EXPERIMENTAL_addAccelData(saveLayerData);
73 } 69 }
74 70
75 // release our refs now, so only the picture will be the owner. 71 // release our refs now, so only the picture will be the owner.
76 fRecorder.reset(NULL); 72 fRecorder.reset(NULL);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 fCullRect, 166 fCullRect,
171 SkToBool(fFlags & kComputeSaveLayerInfo _RecordFlag))); 167 SkToBool(fFlags & kComputeSaveLayerInfo _RecordFlag)));
172 168
173 // release our refs now, so only the drawable will be the owner. 169 // release our refs now, so only the drawable will be the owner.
174 fRecorder.reset(NULL); 170 fRecorder.reset(NULL);
175 fRecord.reset(NULL); 171 fRecord.reset(NULL);
176 fBBH.reset(NULL); 172 fBBH.reset(NULL);
177 173
178 return drawable; 174 return drawable;
179 } 175 }
OLDNEW
« no previous file with comments | « src/core/SkBBoxHierarchy.h ('k') | src/core/SkRTree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698