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

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

Issue 22978012: Split SkDevice into SkBaseDevice and SkBitmapDevice (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updating to ToT (10994) Created 7 years, 3 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 | « src/core/SkBBoxHierarchyRecord.h ('k') | src/core/SkBBoxRecord.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBBoxHierarchyRecord.h" 9 #include "SkBBoxHierarchyRecord.h"
10 #include "SkPictureStateTree.h" 10 #include "SkPictureStateTree.h"
11 11
12 SkBBoxHierarchyRecord::SkBBoxHierarchyRecord(uint32_t recordFlags, 12 SkBBoxHierarchyRecord::SkBBoxHierarchyRecord(uint32_t recordFlags,
13 SkBBoxHierarchy* h, 13 SkBBoxHierarchy* h,
14 SkDevice* device) 14 SkBaseDevice* device)
15 : INHERITED(recordFlags, device) { 15 : INHERITED(recordFlags, device) {
16 fStateTree = SkNEW(SkPictureStateTree); 16 fStateTree = SkNEW(SkPictureStateTree);
17 fBoundingHierarchy = h; 17 fBoundingHierarchy = h;
18 fBoundingHierarchy->ref(); 18 fBoundingHierarchy->ref();
19 fBoundingHierarchy->setClient(this); 19 fBoundingHierarchy->setClient(this);
20 } 20 }
21 21
22 void SkBBoxHierarchyRecord::handleBBox(const SkRect& bounds) { 22 void SkBBoxHierarchyRecord::handleBBox(const SkRect& bounds) {
23 SkIRect r; 23 SkIRect r;
24 bounds.roundOut(&r); 24 bounds.roundOut(&r);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 bool SkBBoxHierarchyRecord::shouldRewind(void* data) { 107 bool SkBBoxHierarchyRecord::shouldRewind(void* data) {
108 // SkBBoxHierarchy::rewindInserts is called by SkPicture after the 108 // SkBBoxHierarchy::rewindInserts is called by SkPicture after the
109 // SkPicture has rewound its command stream. To match that rewind in the 109 // SkPicture has rewound its command stream. To match that rewind in the
110 // BBH, we rewind all draws that reference commands that were recorded 110 // BBH, we rewind all draws that reference commands that were recorded
111 // past the point to which the SkPicture has rewound, which is given by 111 // past the point to which the SkPicture has rewound, which is given by
112 // writeStream().size(). 112 // writeStream().size().
113 SkPictureStateTree::Draw* draw = static_cast<SkPictureStateTree::Draw*>(data ); 113 SkPictureStateTree::Draw* draw = static_cast<SkPictureStateTree::Draw*>(data );
114 return draw->fOffset >= writeStream().size(); 114 return draw->fOffset >= writeStream().size();
115 } 115 }
OLDNEW
« no previous file with comments | « src/core/SkBBoxHierarchyRecord.h ('k') | src/core/SkBBoxRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698