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

Side by Side Diff: include/private/SkRecords.h

Issue 1744103002: move annotations to canvas virtual (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « include/core/SkWriter32.h ('k') | include/utils/SkDumpCanvas.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 #ifndef SkRecords_DEFINED 8 #ifndef SkRecords_DEFINED
9 #define SkRecords_DEFINED 9 #define SkRecords_DEFINED
10 10
11 #include "SkData.h"
11 #include "SkCanvas.h" 12 #include "SkCanvas.h"
12 #include "SkDrawable.h" 13 #include "SkDrawable.h"
13 #include "SkImageFilter.h" 14 #include "SkImageFilter.h"
14 #include "SkMatrix.h" 15 #include "SkMatrix.h"
15 #include "SkPath.h" 16 #include "SkPath.h"
16 #include "SkPicture.h" 17 #include "SkPicture.h"
17 #include "SkRect.h" 18 #include "SkRect.h"
18 #include "SkRRect.h" 19 #include "SkRRect.h"
19 #include "SkRSXform.h" 20 #include "SkRSXform.h"
21 #include "SkString.h"
20 #include "SkTextBlob.h" 22 #include "SkTextBlob.h"
21 23
22 namespace SkRecords { 24 namespace SkRecords {
23 25
24 // A list of all the types of canvas calls we can record. 26 // A list of all the types of canvas calls we can record.
25 // Each of these is reified into a struct below. 27 // Each of these is reified into a struct below.
26 // 28 //
27 // (We're using the macro-of-macro trick here to do several different things wit h the same list.) 29 // (We're using the macro-of-macro trick here to do several different things wit h the same list.)
28 // 30 //
29 // We leave this SK_RECORD_TYPES macro defined for use by code that wants to ope rate on SkRecords 31 // We leave this SK_RECORD_TYPES macro defined for use by code that wants to ope rate on SkRecords
(...skipping 29 matching lines...) Expand all
59 M(DrawPicture) \ 61 M(DrawPicture) \
60 M(DrawPoints) \ 62 M(DrawPoints) \
61 M(DrawPosText) \ 63 M(DrawPosText) \
62 M(DrawPosTextH) \ 64 M(DrawPosTextH) \
63 M(DrawText) \ 65 M(DrawText) \
64 M(DrawTextOnPath) \ 66 M(DrawTextOnPath) \
65 M(DrawRRect) \ 67 M(DrawRRect) \
66 M(DrawRect) \ 68 M(DrawRect) \
67 M(DrawTextBlob) \ 69 M(DrawTextBlob) \
68 M(DrawAtlas) \ 70 M(DrawAtlas) \
69 M(DrawVertices) 71 M(DrawVertices) \
72 M(DrawAnnotation)
70 73
71 // Defines SkRecords::Type, an enum of all record types. 74 // Defines SkRecords::Type, an enum of all record types.
72 #define ENUM(T) T##_Type, 75 #define ENUM(T) T##_Type,
73 enum Type { SK_RECORD_TYPES(ENUM) }; 76 enum Type { SK_RECORD_TYPES(ENUM) };
74 #undef ENUM 77 #undef ENUM
75 78
76 #define ACT_AS_PTR(ptr) \ 79 #define ACT_AS_PTR(ptr) \
77 operator T*() const { return ptr; } \ 80 operator T*() const { return ptr; } \
78 T* operator->() const { return ptr; } 81 T* operator->() const { return ptr; }
79 82
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 RECORD(DrawVertices, kDraw_Tag, 354 RECORD(DrawVertices, kDraw_Tag,
352 SkPaint paint; 355 SkPaint paint;
353 SkCanvas::VertexMode vmode; 356 SkCanvas::VertexMode vmode;
354 int vertexCount; 357 int vertexCount;
355 PODArray<SkPoint> vertices; 358 PODArray<SkPoint> vertices;
356 PODArray<SkPoint> texs; 359 PODArray<SkPoint> texs;
357 PODArray<SkColor> colors; 360 PODArray<SkColor> colors;
358 RefBox<SkXfermode> xmode; 361 RefBox<SkXfermode> xmode;
359 PODArray<uint16_t> indices; 362 PODArray<uint16_t> indices;
360 int indexCount); 363 int indexCount);
361 364 RECORD(DrawAnnotation, 0,
365 SkRect rect;
366 SkString key;
367 RefBox<SkData> value);
362 #undef RECORD 368 #undef RECORD
363 369
364 } // namespace SkRecords 370 } // namespace SkRecords
365 371
366 #endif//SkRecords_DEFINED 372 #endif//SkRecords_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkWriter32.h ('k') | include/utils/SkDumpCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698