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

Side by Side Diff: src/gpu/GrDrawTarget.h

Issue 695873002: small fix for clip mask cache clear (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 6 years, 1 month 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 | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrGpu.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 * Copyright 2010 Google Inc. 2 * Copyright 2010 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 GrDrawTarget_DEFINED 8 #ifndef GrDrawTarget_DEFINED
9 #define GrDrawTarget_DEFINED 9 #define GrDrawTarget_DEFINED
10 10
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 const GrContext* getContext() const { return INHERITED::getContext(); } 961 const GrContext* getContext() const { return INHERITED::getContext(); }
962 962
963 /** 963 /**
964 * Clip Mask Manager(and no one else) needs to clear private stencil bits. 964 * Clip Mask Manager(and no one else) needs to clear private stencil bits.
965 * ClipTarget subclass sets clip bit in the stencil buffer. The subclass 965 * ClipTarget subclass sets clip bit in the stencil buffer. The subclass
966 * is free to clear the remaining bits to zero if masked clears are more 966 * is free to clear the remaining bits to zero if masked clears are more
967 * expensive than clearing all bits. 967 * expensive than clearing all bits.
968 */ 968 */
969 virtual void clearStencilClip(const SkIRect& rect, bool insideClip, GrRender Target* = NULL) = 0; 969 virtual void clearStencilClip(const SkIRect& rect, bool insideClip, GrRender Target* = NULL) = 0;
970 970
971 /**
972 * Release any resources that are cached but not currently in use. This
973 * is intended to give an application some recourse when resources are low.
974 */
975 virtual void purgeResources() SK_OVERRIDE {
976 // The clip mask manager can rebuild all its clip masks so just
977 // get rid of them all.
978 fClipMaskManager.purgeResources();
979 };
980
971 protected: 981 protected:
972 GrClipMaskManager fClipMaskManager; 982 GrClipMaskManager fClipMaskManager;
973 983
974 private: 984 private:
975 GrClipMaskManager* getClipMaskManager() { return &fClipMaskManager; } 985 GrClipMaskManager* getClipMaskManager() { return &fClipMaskManager; }
976 986
977 typedef GrDrawTarget INHERITED; 987 typedef GrDrawTarget INHERITED;
978 }; 988 };
979 989
980 #endif 990 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698