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

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

Issue 54543008: Revert "Avoid re-rendering stencil clip for every draw with reducable clip stack" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrReducedClip.cpp ('k') | src/gpu/SkGpuDevice.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 Google Inc. 3 * Copyright 2011 Google Inc.
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 GrStencilBuffer_DEFINED 10 #ifndef GrStencilBuffer_DEFINED
(...skipping 25 matching lines...) Expand all
36 const SkIPoint clipSpaceToStencilOffset) { 36 const SkIPoint clipSpaceToStencilOffset) {
37 fLastClipStackGenID = clipStackGenID; 37 fLastClipStackGenID = clipStackGenID;
38 fLastClipStackRect = clipSpaceRect; 38 fLastClipStackRect = clipSpaceRect;
39 fLastClipSpaceOffset = clipSpaceToStencilOffset; 39 fLastClipSpaceOffset = clipSpaceToStencilOffset;
40 } 40 }
41 41
42 // called to determine if we have to render the clip into SB. 42 // called to determine if we have to render the clip into SB.
43 bool mustRenderClip(int32_t clipStackGenID, 43 bool mustRenderClip(int32_t clipStackGenID,
44 const SkIRect& clipSpaceRect, 44 const SkIRect& clipSpaceRect,
45 const SkIPoint clipSpaceToStencilOffset) const { 45 const SkIPoint clipSpaceToStencilOffset) const {
46 return fLastClipStackGenID != clipStackGenID || 46 return SkClipStack::kInvalidGenID == clipStackGenID ||
47 fLastClipStackGenID != clipStackGenID ||
47 fLastClipSpaceOffset != clipSpaceToStencilOffset || 48 fLastClipSpaceOffset != clipSpaceToStencilOffset ||
48 !fLastClipStackRect.contains(clipSpaceRect); 49 !fLastClipStackRect.contains(clipSpaceRect);
49 } 50 }
50 51
51 // Places the sb in the cache. The cache takes a ref of the stencil buffer. 52 // Places the sb in the cache. The cache takes a ref of the stencil buffer.
52 void transferToCache(); 53 void transferToCache();
53 54
54 static GrResourceKey ComputeKey(int width, int height, int sampleCnt); 55 static GrResourceKey ComputeKey(int width, int height, int sampleCnt);
55 56
56 protected: 57 protected:
(...skipping 15 matching lines...) Expand all
72 int fSampleCnt; 73 int fSampleCnt;
73 74
74 int32_t fLastClipStackGenID; 75 int32_t fLastClipStackGenID;
75 SkIRect fLastClipStackRect; 76 SkIRect fLastClipStackRect;
76 SkIPoint fLastClipSpaceOffset; 77 SkIPoint fLastClipSpaceOffset;
77 78
78 typedef GrResource INHERITED; 79 typedef GrResource INHERITED;
79 }; 80 };
80 81
81 #endif 82 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrReducedClip.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698