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

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

Issue 993863002: Make the canvas draw looper internal layer not part of SkCanvas save count Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: another approach Created 5 years, 8 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 | « gyp/tests.gypi ('k') | src/core/SkCanvas.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 /* 2 /*
3 * Copyright 2011 The Android Open Source Project 3 * Copyright 2011 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 SkDrawLooper_DEFINED 10 #ifndef SkDrawLooper_DEFINED
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 * canvas and/or paint). When false is finally returned, drawing for th e object 49 * canvas and/or paint). When false is finally returned, drawing for th e object
50 * stops. 50 * stops.
51 * 51 *
52 * On each call, the paint will be in its original state, but the 52 * On each call, the paint will be in its original state, but the
53 * canvas will be as it was following the previous call to next() or 53 * canvas will be as it was following the previous call to next() or
54 * createContext(). 54 * createContext().
55 * 55 *
56 * The implementation must ensure that, when next() finally returns 56 * The implementation must ensure that, when next() finally returns
57 * false, the canvas has been restored to the state it was 57 * false, the canvas has been restored to the state it was
58 * initially, before createContext() was first called. 58 * initially, before createContext() was first called.
59 *
60 * It is an error to call SkCanvas::restore() or SkCanvas::restoreToCou nt on the canvas
61 * from this function, unless corresponding SkCanvas::save() or SkCanva s::saveLayer() has
62 * been called. The corresponding save call must be made from this func tion, but it may be
63 * made from earlier invocation.
59 */ 64 */
60 virtual bool next(SkCanvas* canvas, SkPaint* paint) = 0; 65 virtual bool next(SkCanvas* canvas, SkPaint* paint) = 0;
61 }; 66 };
62 67
63 /** 68 /**
64 * Called right before something is being drawn. Returns a Context 69 * Called right before something is being drawn. Returns a Context
65 * whose next() method should be called until it returns false. 70 * whose next() method should be called until it returns false.
66 * The caller has to ensure that the storage pointer provides enough 71 * The caller has to ensure that the storage pointer provides enough
67 * memory for the Context. The required size can be queried by calling 72 * memory for the Context. The required size can be queried by calling
68 * contextSize(). It is also the caller's responsibility to destroy the 73 * contextSize(). It is also the caller's responsibility to destroy the
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper) 117 SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper)
113 118
114 protected: 119 protected:
115 SkDrawLooper() {} 120 SkDrawLooper() {}
116 121
117 private: 122 private:
118 typedef SkFlattenable INHERITED; 123 typedef SkFlattenable INHERITED;
119 }; 124 };
120 125
121 #endif 126 #endif
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698