| OLD | NEW |
| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, LifeCycle lifeCycle, int width, int height,
int bits, |
| 57 int sampleCnt) | 57 int sampleCnt) |
| 58 : GrGpuResource(gpu, lifeCycle) | 58 : GrGpuResource(gpu, lifeCycle, GrGpuResource::kOther) |
| 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 |
| OLD | NEW |