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

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

Issue 1810323002: Cache render targets that render to wrapped textures Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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
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 GrStencilAttachment_DEFINED 10 #ifndef GrStencilAttachment_DEFINED
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 fLastClipSpaceOffset != clipSpaceToStencilOffset || 46 fLastClipSpaceOffset != clipSpaceToStencilOffset ||
47 !fLastClipStackRect.contains(clipSpaceRect); 47 !fLastClipStackRect.contains(clipSpaceRect);
48 } 48 }
49 49
50 // We create a unique stencil buffer at each width, height and sampleCnt and share it for 50 // We create a unique stencil buffer at each width, height and sampleCnt and share it for
51 // all render targets that require a stencil with those params. 51 // all render targets that require a stencil with those params.
52 static void ComputeSharedStencilAttachmentKey(int width, int height, int sam pleCnt, 52 static void ComputeSharedStencilAttachmentKey(int width, int height, int sam pleCnt,
53 GrUniqueKey* key); 53 GrUniqueKey* key);
54 54
55 protected: 55 protected:
56 GrStencilAttachment(GrGpu* gpu, LifeCycle lifeCycle, int width, int height, int bits, 56 GrStencilAttachment(GrGpu* gpu, SkBudgeted budgeted, int width, int height, int bits,
57 int sampleCnt) 57 int sampleCnt)
58 : GrGpuResource(gpu, lifeCycle) 58 : GrGpuResource(gpu, budgeted)
59 , fWidth(width) 59 , fWidth(width)
60 , fHeight(height) 60 , fHeight(height)
61 , fBits(bits) 61 , fBits(bits)
62 , fSampleCnt(sampleCnt) 62 , fSampleCnt(sampleCnt)
63 , fLastClipStackGenID(SkClipStack::kInvalidGenID) { 63 , fLastClipStackGenID(SkClipStack::kInvalidGenID) {
64 fLastClipStackRect.setEmpty(); 64 fLastClipStackRect.setEmpty();
65 } 65 }
66 66
67 private: 67 private:
68 68
69 int fWidth; 69 int fWidth;
70 int fHeight; 70 int fHeight;
71 int fBits; 71 int fBits;
72 int fSampleCnt; 72 int fSampleCnt;
73 73
74 int32_t fLastClipStackGenID; 74 int32_t fLastClipStackGenID;
75 SkIRect fLastClipStackRect; 75 SkIRect fLastClipStackRect;
76 SkIPoint fLastClipSpaceOffset; 76 SkIPoint fLastClipSpaceOffset;
77 77
78 typedef GrGpuResource INHERITED; 78 typedef GrGpuResource INHERITED;
79 }; 79 };
80 80
81 #endif 81 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrResourceProvider.cpp ('k') | src/gpu/GrSurface.cpp » ('j') | src/gpu/gl/GrGLGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698