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

Side by Side Diff: cc/paint/paint_canvas.h

Issue 2757313002: Add PaintCanvas::drawDisplayItemList (Closed)
Patch Set: Created 3 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 | « no previous file | cc/paint/skia_paint_canvas.h » ('j') | cc/paint/skia_paint_canvas.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_PAINT_PAINT_CANVAS_H_ 5 #ifndef CC_PAINT_PAINT_CANVAS_H_
6 #define CC_PAINT_PAINT_CANVAS_H_ 6 #define CC_PAINT_PAINT_CANVAS_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "cc/paint/paint_export.h" 11 #include "cc/paint/paint_export.h"
12 #include "cc/paint/paint_record.h" 12 #include "cc/paint/paint_record.h"
13 #include "third_party/skia/include/core/SkCanvas.h" 13 #include "third_party/skia/include/core/SkCanvas.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 class DisplayItemList;
17 class PaintFlags; 18 class PaintFlags;
18 19
19 class CC_PAINT_EXPORT PaintCanvas { 20 class CC_PAINT_EXPORT PaintCanvas {
20 public: 21 public:
21 virtual SkMetaData& getMetaData() = 0; 22 virtual SkMetaData& getMetaData() = 0;
22 virtual SkImageInfo imageInfo() const = 0; 23 virtual SkImageInfo imageInfo() const = 0;
23 24
24 // TODO(enne): It would be nice to get rid of flush() entirely, as it 25 // TODO(enne): It would be nice to get rid of flush() entirely, as it
25 // doesn't really make sense for recording. However, this gets used by 26 // doesn't really make sense for recording. However, this gets used by
26 // SkCanvasVideoRenderer which takes a PaintCanvas to paint both 27 // SkCanvasVideoRenderer which takes a PaintCanvas to paint both
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 const PaintFlags& flags) = 0; 171 const PaintFlags& flags) = 0;
171 virtual void drawTextBlob(const SkTextBlob* blob, 172 virtual void drawTextBlob(const SkTextBlob* blob,
172 SkScalar x, 173 SkScalar x,
173 SkScalar y, 174 SkScalar y,
174 const PaintFlags& flags) = 0; 175 const PaintFlags& flags) = 0;
175 virtual void drawTextBlob(const sk_sp<SkTextBlob>& blob, 176 virtual void drawTextBlob(const sk_sp<SkTextBlob>& blob,
176 SkScalar x, 177 SkScalar x,
177 SkScalar y, 178 SkScalar y,
178 const PaintFlags& flags) = 0; 179 const PaintFlags& flags) = 0;
179 180
181 virtual void drawDisplayItemList(
182 const SkRect& bounds,
183 const DisplayItemList* display_item_list) = 0;
184
180 virtual void drawPicture(const PaintRecord* record) = 0; 185 virtual void drawPicture(const PaintRecord* record) = 0;
181 virtual void drawPicture(const PaintRecord* record, 186 virtual void drawPicture(const PaintRecord* record,
182 const SkMatrix* matrix, 187 const SkMatrix* matrix,
183 const PaintFlags* flags) = 0; 188 const PaintFlags* flags) = 0;
184 virtual void drawPicture(sk_sp<PaintRecord> record) = 0; 189 virtual void drawPicture(sk_sp<PaintRecord> record) = 0;
185 190
186 virtual bool isClipEmpty() const = 0; 191 virtual bool isClipEmpty() const = 0;
187 virtual bool isClipRect() const = 0; 192 virtual bool isClipRect() const = 0;
188 virtual const SkMatrix& getTotalMatrix() const = 0; 193 virtual const SkMatrix& getTotalMatrix() const = 0;
189 194
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 const SkPoint& point, 271 const SkPoint& point,
267 SkData* data); 272 SkData* data);
268 273
269 CC_PAINT_EXPORT void PaintCanvasAnnotateLinkToDestination(PaintCanvas* canvas, 274 CC_PAINT_EXPORT void PaintCanvasAnnotateLinkToDestination(PaintCanvas* canvas,
270 const SkRect& rect, 275 const SkRect& rect,
271 SkData* data); 276 SkData* data);
272 277
273 } // namespace cc 278 } // namespace cc
274 279
275 #endif // CC_PAINT_PAINT_CANVAS_H_ 280 #endif // CC_PAINT_PAINT_CANVAS_H_
OLDNEW
« no previous file with comments | « no previous file | cc/paint/skia_paint_canvas.h » ('j') | cc/paint/skia_paint_canvas.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698