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

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

Issue 144283004: Add dev bounds to bmp txt context, use bounds to ignore clips (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: cleanup comment Created 6 years, 10 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
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrClipMaskManager.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 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 GrClipMaskManager_DEFINED 8 #ifndef GrClipMaskManager_DEFINED
9 #define GrClipMaskManager_DEFINED 9 #define GrClipMaskManager_DEFINED
10 10
(...skipping 29 matching lines...) Expand all
40 class GrClipMaskManager : public SkNoncopyable { 40 class GrClipMaskManager : public SkNoncopyable {
41 public: 41 public:
42 GrClipMaskManager() 42 GrClipMaskManager()
43 : fGpu(NULL) 43 : fGpu(NULL)
44 , fCurrClipMaskType(kNone_ClipMaskType) { 44 , fCurrClipMaskType(kNone_ClipMaskType) {
45 } 45 }
46 46
47 /** 47 /**
48 * Creates a clip mask if necessary as a stencil buffer or alpha texture 48 * Creates a clip mask if necessary as a stencil buffer or alpha texture
49 * and sets the GrGpu's scissor and stencil state. If the return is false 49 * and sets the GrGpu's scissor and stencil state. If the return is false
50 * then the draw can be skipped. 50 * then the draw can be skipped. The AutoRestoreEffects is initialized by
51 * the manager when it must install additional effects to implement the
52 * clip. devBounds is optional but can help optimize clipping.
51 */ 53 */
52 bool setupClipping(const GrClipData* clipDataIn, GrDrawState::AutoRestoreEff ects*); 54 bool setupClipping(const GrClipData* clipDataIn, GrDrawState::AutoRestoreEff ects*,
55 const SkRect* devBounds);
53 56
54 void releaseResources(); 57 void releaseResources();
55 58
56 bool isClipInStencil() const { 59 bool isClipInStencil() const {
57 return kStencil_ClipMaskType == fCurrClipMaskType; 60 return kStencil_ClipMaskType == fCurrClipMaskType;
58 } 61 }
59 bool isClipInAlpha() const { 62 bool isClipInAlpha() const {
60 return kAlpha_ClipMaskType == fCurrClipMaskType; 63 return kAlpha_ClipMaskType == fCurrClipMaskType;
61 } 64 }
62 65
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 * clipping. 170 * clipping.
168 */ 171 */
169 void adjustStencilParams(GrStencilSettings* settings, 172 void adjustStencilParams(GrStencilSettings* settings,
170 StencilClipMode mode, 173 StencilClipMode mode,
171 int stencilBitCnt); 174 int stencilBitCnt);
172 175
173 typedef SkNoncopyable INHERITED; 176 typedef SkNoncopyable INHERITED;
174 }; 177 };
175 178
176 #endif // GrClipMaskManager_DEFINED 179 #endif // GrClipMaskManager_DEFINED
OLDNEW
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698