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

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

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