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

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

Issue 115323004: Improved SkPathRef interface security (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix private pathref test pattern Created 7 years 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
« no previous file with comments | « no previous file | include/core/SkPathRef.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkPath_DEFINED 10 #ifndef SkPath_DEFINED
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 perform some computation (false). 998 perform some computation (false).
999 */ 999 */
1000 bool hasComputedBounds() const { 1000 bool hasComputedBounds() const {
1001 SkDEBUGCODE(this->validate();) 1001 SkDEBUGCODE(this->validate();)
1002 return fPathRef->hasComputedBounds(); 1002 return fPathRef->hasComputedBounds();
1003 } 1003 }
1004 1004
1005 1005
1006 // 'rect' needs to be sorted 1006 // 'rect' needs to be sorted
1007 void setBounds(const SkRect& rect) { 1007 void setBounds(const SkRect& rect) {
1008 fPathRef->setBounds(rect); 1008 SkPathRef::Editor ed(&fPathRef);
1009
1010 ed.setBounds(rect);
1009 } 1011 }
1010 1012
1011 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TO O 1013 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TO O
1012 friend class SkPathRef; // just for SerializationOffsets 1014 friend class SkPathRef; // just for SerializationOffsets
1013 #endif 1015 #endif
1014 friend class SkAutoPathBoundsUpdate; 1016 friend class SkAutoPathBoundsUpdate;
1015 friend class SkAutoDisableOvalCheck; 1017 friend class SkAutoDisableOvalCheck;
1016 friend class SkAutoDisableDirectionCheck; 1018 friend class SkAutoDisableDirectionCheck;
1017 friend class SkBench_AddPathTest; // perf test reversePathTo 1019 friend class SkBench_AddPathTest; // perf test reversePathTo
1018 friend class PathTest_Private; // unit test reversePathTo 1020 friend class PathTest_Private; // unit test reversePathTo
1019 }; 1021 };
1020 1022
1021 #endif 1023 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkPathRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698