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

Side by Side Diff: src/core/SkBBoxRecord.h

Issue 324293004: Remove picture pre-allocation from SkPictureRecorder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix initializer list order Created 6 years, 6 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/SkBBoxHierarchyRecord.cpp ('k') | src/core/SkPicture.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 /* 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 #ifndef SkBBoxRecord_DEFINED 9 #ifndef SkBBoxRecord_DEFINED
10 #define SkBBoxRecord_DEFINED 10 #define SkBBoxRecord_DEFINED
11 11
12 #include "SkPictureRecord.h" 12 #include "SkPictureRecord.h"
13 13
14 /** 14 /**
15 * This is an abstract SkPictureRecord subclass that intercepts draw calls and computes an 15 * This is an abstract SkPictureRecord subclass that intercepts draw calls and computes an
16 * axis-aligned bounding box for each draw that it sees, subclasses implement h andleBBox() 16 * axis-aligned bounding box for each draw that it sees, subclasses implement h andleBBox()
17 * which will be called every time we get a new bounding box. 17 * which will be called every time we get a new bounding box.
18 */ 18 */
19 class SkBBoxRecord : public SkPictureRecord { 19 class SkBBoxRecord : public SkPictureRecord {
20 public: 20 public:
21 21
22 SkBBoxRecord(SkPicture* picture, const SkISize& size, uint32_t recordFlags) 22 SkBBoxRecord(const SkISize& size, uint32_t recordFlags)
23 : INHERITED(picture, size, recordFlags) { 23 : INHERITED(size, recordFlags) {
24 } 24 }
25 virtual ~SkBBoxRecord() { } 25 virtual ~SkBBoxRecord() { }
26 26
27 /** 27 /**
28 * This is called each time we get a bounding box, it will be axis-aligned, 28 * This is called each time we get a bounding box, it will be axis-aligned,
29 * in device coordinates, and expanded to include stroking, shadows, etc. 29 * in device coordinates, and expanded to include stroking, shadows, etc.
30 */ 30 */
31 virtual void handleBBox(const SkRect& bbox) = 0; 31 virtual void handleBBox(const SkRect& bbox) = 0;
32 32
33 virtual void drawOval(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE; 33 virtual void drawOval(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 * Takes a bounding box in current canvas view space, accounts for stroking and effects, and 72 * Takes a bounding box in current canvas view space, accounts for stroking and effects, and
73 * computes an axis-aligned bounding box in device coordinates, then passes it to handleBBox() 73 * computes an axis-aligned bounding box in device coordinates, then passes it to handleBBox()
74 * returns false if the draw is completely clipped out, and may safely be ig nored. 74 * returns false if the draw is completely clipped out, and may safely be ig nored.
75 **/ 75 **/
76 bool transformBounds(const SkRect& bounds, const SkPaint* paint); 76 bool transformBounds(const SkRect& bounds, const SkPaint* paint);
77 77
78 typedef SkPictureRecord INHERITED; 78 typedef SkPictureRecord INHERITED;
79 }; 79 };
80 80
81 #endif 81 #endif
OLDNEW
« no previous file with comments | « src/core/SkBBoxHierarchyRecord.cpp ('k') | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698