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

Side by Side Diff: include/core/SkAnnotation.h

Issue 134163010: Refactor read and write buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: original write flags were fine Created 6 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 SkAnnotation_DEFINED 8 #ifndef SkAnnotation_DEFINED
9 #define SkAnnotation_DEFINED 9 #define SkAnnotation_DEFINED
10 10
11 #include "SkRefCnt.h" 11 #include "SkRefCnt.h"
12 #include "SkString.h" 12 #include "SkString.h"
13 13
14 class SkData; 14 class SkData;
15 class SkFlattenableReadBuffer; 15 class SkReadBuffer;
16 class SkFlattenableWriteBuffer; 16 class SkWriteBuffer;
17 class SkStream; 17 class SkStream;
18 class SkWStream; 18 class SkWStream;
19 struct SkPoint; 19 struct SkPoint;
20 20
21 /** 21 /**
22 * Experimental class for annotating draws. Do not use directly yet. 22 * Experimental class for annotating draws. Do not use directly yet.
23 * Use helper functions at the bottom of this file for now. 23 * Use helper functions at the bottom of this file for now.
24 */ 24 */
25 class SkAnnotation : public SkRefCnt { 25 class SkAnnotation : public SkRefCnt {
26 public: 26 public:
27 SkAnnotation(const char key[], SkData* value); 27 SkAnnotation(const char key[], SkData* value);
28 virtual ~SkAnnotation(); 28 virtual ~SkAnnotation();
29 29
30 /** 30 /**
31 * Return the data for the specified key, or NULL. 31 * Return the data for the specified key, or NULL.
32 */ 32 */
33 SkData* find(const char key[]) const; 33 SkData* find(const char key[]) const;
34 34
35 SkAnnotation(SkFlattenableReadBuffer&); 35 SkAnnotation(SkReadBuffer&);
36 void writeToBuffer(SkFlattenableWriteBuffer&) const; 36 void writeToBuffer(SkWriteBuffer&) const;
37 37
38 private: 38 private:
39 SkString fKey; 39 SkString fKey;
40 SkData* fData; 40 SkData* fData;
41 41
42 typedef SkRefCnt INHERITED; 42 typedef SkRefCnt INHERITED;
43 }; 43 };
44 44
45 /** 45 /**
46 * Experimental collection of predefined Keys into the Annotation dictionary 46 * Experimental collection of predefined Keys into the Annotation dictionary
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 * 105 *
106 * If the backend of this canvas does not support annotations, this call is 106 * If the backend of this canvas does not support annotations, this call is
107 * safely ignored. 107 * safely ignored.
108 * 108 *
109 * The caller is responsible for managing its ownership of the SkData. 109 * The caller is responsible for managing its ownership of the SkData.
110 */ 110 */
111 SK_API void SkAnnotateLinkToDestination(SkCanvas*, const SkRect&, SkData*); 111 SK_API void SkAnnotateLinkToDestination(SkCanvas*, const SkRect&, SkData*);
112 112
113 113
114 #endif 114 #endif
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | include/core/SkBitmap.h » ('j') | include/core/SkFlattenableBuffers.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698