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

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

Issue 1862043002: Refactor to separate backend object lifecycle and GpuResource budget decision (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix unrelated GrBuffer::onGpuMemorySize() lack of override keyword compile error Created 4 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 | « src/gpu/GrResourceCache.cpp ('k') | src/gpu/GrTexture.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 2011 Google Inc. 2 * Copyright 2011 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 8
9 #ifndef GrStencilAttachment_DEFINED 9 #ifndef GrStencilAttachment_DEFINED
10 #define GrStencilAttachment_DEFINED 10 #define GrStencilAttachment_DEFINED
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 fLastClipSpaceOffset != clipSpaceToStencilOffset || 45 fLastClipSpaceOffset != clipSpaceToStencilOffset ||
46 !fLastClipStackRect.contains(clipSpaceRect); 46 !fLastClipStackRect.contains(clipSpaceRect);
47 } 47 }
48 48
49 // We create a unique stencil buffer at each width, height and sampleCnt and share it for 49 // We create a unique stencil buffer at each width, height and sampleCnt and share it for
50 // all render targets that require a stencil with those params. 50 // all render targets that require a stencil with those params.
51 static void ComputeSharedStencilAttachmentKey(int width, int height, int sam pleCnt, 51 static void ComputeSharedStencilAttachmentKey(int width, int height, int sam pleCnt,
52 GrUniqueKey* key); 52 GrUniqueKey* key);
53 53
54 protected: 54 protected:
55 GrStencilAttachment(GrGpu* gpu, LifeCycle lifeCycle, int width, int height, int bits, 55 GrStencilAttachment(GrGpu* gpu, int width, int height, int bits,
56 int sampleCnt) 56 int sampleCnt)
57 : GrGpuResource(gpu, lifeCycle) 57 : GrGpuResource(gpu)
58 , fWidth(width) 58 , fWidth(width)
59 , fHeight(height) 59 , fHeight(height)
60 , fBits(bits) 60 , fBits(bits)
61 , fSampleCnt(sampleCnt) 61 , fSampleCnt(sampleCnt)
62 , fLastClipStackGenID(SkClipStack::kInvalidGenID) { 62 , fLastClipStackGenID(SkClipStack::kInvalidGenID) {
63 fLastClipStackRect.setEmpty(); 63 fLastClipStackRect.setEmpty();
64 } 64 }
65 65
66 private: 66 private:
67 67
68 int fWidth; 68 int fWidth;
69 int fHeight; 69 int fHeight;
70 int fBits; 70 int fBits;
71 int fSampleCnt; 71 int fSampleCnt;
72 72
73 int32_t fLastClipStackGenID; 73 int32_t fLastClipStackGenID;
74 SkIRect fLastClipStackRect; 74 SkIRect fLastClipStackRect;
75 SkIPoint fLastClipSpaceOffset; 75 SkIPoint fLastClipSpaceOffset;
76 76
77 typedef GrGpuResource INHERITED; 77 typedef GrGpuResource INHERITED;
78 }; 78 };
79 79
80 #endif 80 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrResourceCache.cpp ('k') | src/gpu/GrTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698