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

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

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: New serialization method Created 7 years, 3 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 | Annotate | Revision Log
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 "SkFlattenable.h" 11 #include "SkFlattenable.h"
12 12
13 class SkData; 13 class SkData;
14 class SkDataSet; 14 class SkDataSet;
15 class SkStream; 15 class SkStream;
16 class SkWStream; 16 class SkWStream;
17 struct SkPoint; 17 struct SkPoint;
18 18
19 /** 19 /**
20 * Experimental class for annotating draws. Do not use directly yet. 20 * Experimental class for annotating draws. Do not use directly yet.
21 * Use helper functions at the bottom of this file for now. 21 * Use helper functions at the bottom of this file for now.
22 */ 22 */
23 class SkAnnotation : public SkFlattenable { 23 class SkAnnotation : public SkFlattenable {
24 typedef SkFlattenable INHERITED;
mtklein 2013/09/24 22:52:18 Can you come up with a small test case that shows
sugoi1 2013/09/25 21:15:27 I got this error while writing some code last week
25
24 public: 26 public:
25 enum Flags { 27 enum Flags {
26 // If set, the associated drawing primitive should not be drawn 28 // If set, the associated drawing primitive should not be drawn
27 kNoDraw_Flag = 1 << 0, 29 kNoDraw_Flag = 1 << 0,
28 }; 30 };
29 31
30 SkAnnotation(SkDataSet*, uint32_t flags); 32 SkAnnotation(SkDataSet*, uint32_t flags);
31 virtual ~SkAnnotation(); 33 virtual ~SkAnnotation();
32 34
33 uint32_t getFlags() const { return fFlags; } 35 uint32_t getFlags() const { return fFlags; }
(...skipping 11 matching lines...) Expand all
45 protected: 47 protected:
46 SkAnnotation(SkFlattenableReadBuffer&); 48 SkAnnotation(SkFlattenableReadBuffer&);
47 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 49 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
48 50
49 private: 51 private:
50 SkDataSet* fDataSet; 52 SkDataSet* fDataSet;
51 uint32_t fFlags; 53 uint32_t fFlags;
52 54
53 void writeToStream(SkWStream*) const; 55 void writeToStream(SkWStream*) const;
54 void readFromStream(SkStream*); 56 void readFromStream(SkStream*);
55
56 typedef SkFlattenable INHERITED;
57 }; 57 };
58 58
59 /** 59 /**
60 * Experimental collection of predefined Keys into the Annotation dictionary 60 * Experimental collection of predefined Keys into the Annotation dictionary
61 */ 61 */
62 class SkAnnotationKeys { 62 class SkAnnotationKeys {
63 public: 63 public:
64 /** 64 /**
65 * Returns the canonical key whose payload is a URL 65 * Returns the canonical key whose payload is a URL
66 */ 66 */
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 * 119 *
120 * If the backend of this canvas does not support annotations, this call is 120 * If the backend of this canvas does not support annotations, this call is
121 * safely ignored. 121 * safely ignored.
122 * 122 *
123 * The caller is responsible for managing its ownership of the SkData. 123 * The caller is responsible for managing its ownership of the SkData.
124 */ 124 */
125 SK_API void SkAnnotateLinkToDestination(SkCanvas*, const SkRect&, SkData*); 125 SK_API void SkAnnotateLinkToDestination(SkCanvas*, const SkRect&, SkData*);
126 126
127 127
128 #endif 128 #endif
OLDNEW
« no previous file with comments | « gyp/effects.gypi ('k') | include/core/SkBitmap.h » ('j') | include/core/SkColorFilter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698