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

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

Issue 2757313002: Add PaintCanvas::drawDisplayItemList (Closed)
Patch Set: none 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') | no next file with comments »
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 const PaintFlags& flags) = 0; 158 const PaintFlags& flags) = 0;
158 virtual void drawPosText(const void* text, 159 virtual void drawPosText(const void* text,
159 size_t byte_length, 160 size_t byte_length,
160 const SkPoint pos[], 161 const SkPoint pos[],
161 const PaintFlags& flags) = 0; 162 const PaintFlags& flags) = 0;
162 virtual void drawTextBlob(sk_sp<SkTextBlob> blob, 163 virtual void drawTextBlob(sk_sp<SkTextBlob> blob,
163 SkScalar x, 164 SkScalar x,
164 SkScalar y, 165 SkScalar y,
165 const PaintFlags& flags) = 0; 166 const PaintFlags& flags) = 0;
166 167
168 virtual void drawDisplayItemList(
169 const SkRect& bounds,
170 const DisplayItemList* display_item_list) = 0;
171
167 virtual void drawPicture(sk_sp<const PaintRecord> record, 172 virtual void drawPicture(sk_sp<const PaintRecord> record,
168 const SkMatrix* matrix, 173 const SkMatrix* matrix,
169 const PaintFlags* flags) = 0; 174 const PaintFlags* flags) = 0;
170 void drawPicture(sk_sp<const PaintRecord> record) { 175 void drawPicture(sk_sp<const PaintRecord> record) {
171 drawPicture(record, nullptr, nullptr); 176 drawPicture(record, nullptr, nullptr);
172 } 177 }
173 178
174 virtual bool isClipEmpty() const = 0; 179 virtual bool isClipEmpty() const = 0;
175 virtual bool isClipRect() const = 0; 180 virtual bool isClipRect() const = 0;
176 virtual const SkMatrix& getTotalMatrix() const = 0; 181 virtual const SkMatrix& getTotalMatrix() const = 0;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 const SkPoint& point, 259 const SkPoint& point,
255 SkData* data); 260 SkData* data);
256 261
257 CC_PAINT_EXPORT void PaintCanvasAnnotateLinkToDestination(PaintCanvas* canvas, 262 CC_PAINT_EXPORT void PaintCanvasAnnotateLinkToDestination(PaintCanvas* canvas,
258 const SkRect& rect, 263 const SkRect& rect,
259 SkData* data); 264 SkData* data);
260 265
261 } // namespace cc 266 } // namespace cc
262 267
263 #endif // CC_PAINT_PAINT_CANVAS_H_ 268 #endif // CC_PAINT_PAINT_CANVAS_H_
OLDNEW
« no previous file with comments | « no previous file | cc/paint/skia_paint_canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698