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

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

Issue 1183853003: skia: Add runtime option to disable picture IO security precautions (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: rename stuff Created 5 years, 6 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 | src/core/SkPicture.cpp » ('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 2007 The Android Open Source Project 2 * Copyright 2007 The Android Open Source Project
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 SkPicture_DEFINED 8 #ifndef SkPicture_DEFINED
9 #define SkPicture_DEFINED 9 #define SkPicture_DEFINED
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 /** Return true if the picture is suitable for rendering on the GPU. */ 147 /** Return true if the picture is suitable for rendering on the GPU. */
148 bool suitableForGpuRasterization(GrContext*, const char** whyNot = NULL) con st; 148 bool suitableForGpuRasterization(GrContext*, const char** whyNot = NULL) con st;
149 149
150 // Sent via SkMessageBus from destructor. 150 // Sent via SkMessageBus from destructor.
151 struct DeletionMessage { int32_t fUniqueID; }; // TODO: -> uint32_t? 151 struct DeletionMessage { int32_t fUniqueID; }; // TODO: -> uint32_t?
152 152
153 // Returns NULL if this is not an SkBigPicture. 153 // Returns NULL if this is not an SkBigPicture.
154 virtual const SkBigPicture* asSkBigPicture() const { return NULL; } 154 virtual const SkBigPicture* asSkBigPicture() const { return NULL; }
155 155
156 // Global setting to enable or disable security precautions for serializatio n.
157 static void SetPictureIOSecurityPrecautionsEnabled_Dangerous(bool set);
158 static bool PictureIOSecurityPrecautionsEnabled();
159
156 private: 160 private:
157 // Subclass whitelist. 161 // Subclass whitelist.
158 SkPicture(); 162 SkPicture();
159 friend class SkBigPicture; 163 friend class SkBigPicture;
160 friend class SkEmptyPicture; 164 friend class SkEmptyPicture;
161 template <typename> friend class SkMiniPicture; 165 template <typename> friend class SkMiniPicture;
162 166
163 virtual int numSlowPaths() const = 0; 167 virtual int numSlowPaths() const = 0;
164 friend struct SkPathCounter; 168 friend struct SkPathCounter;
165 169
(...skipping 16 matching lines...) Expand all
182 static bool IsValidPictInfo(const SkPictInfo& info); 186 static bool IsValidPictInfo(const SkPictInfo& info);
183 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); 187 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*);
184 188
185 SkPictInfo createHeader() const; 189 SkPictInfo createHeader() const;
186 SkPictureData* backport() const; 190 SkPictureData* backport() const;
187 191
188 mutable uint32_t fUniqueID; 192 mutable uint32_t fUniqueID;
189 }; 193 };
190 194
191 #endif 195 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698