| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrProgramElement_DEFINED | 8 #ifndef GrProgramElement_DEFINED |
| 9 #define GrProgramElement_DEFINED | 9 #define GrProgramElement_DEFINED |
| 10 | 10 |
| 11 #include "../private/SkTArray.h" |
| 11 #include "SkRefCnt.h" | 12 #include "SkRefCnt.h" |
| 12 #include "SkTArray.h" | |
| 13 | 13 |
| 14 class GrGpuResourceRef; | 14 class GrGpuResourceRef; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Base class for GrProcessor. This exists to manage transitioning a GrProcessor
from being owned by | 17 * Base class for GrProcessor. This exists to manage transitioning a GrProcessor
from being owned by |
| 18 * a client to being scheduled for execution. While a GrProcessor is ref'ed by d
rawing code its | 18 * a client to being scheduled for execution. While a GrProcessor is ref'ed by d
rawing code its |
| 19 * GrGpu resources must also be ref'ed to prevent incorrectly recycling them thr
ough the cache. | 19 * GrGpu resources must also be ref'ed to prevent incorrectly recycling them thr
ough the cache. |
| 20 * However, once the GrProcessor is baked into a GrPipeline and the drawing code
has stopped ref'ing | 20 * However, once the GrProcessor is baked into a GrPipeline and the drawing code
has stopped ref'ing |
| 21 * it, it's internal resources can be recycled in some cases. | 21 * it, it's internal resources can be recycled in some cases. |
| 22 * | 22 * |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 SkSTArray<4, const GrGpuResourceRef*, true> fGpuResources; | 140 SkSTArray<4, const GrGpuResourceRef*, true> fGpuResources; |
| 141 | 141 |
| 142 // Only this class can access addPendingExecution() and completedExecution()
. | 142 // Only this class can access addPendingExecution() and completedExecution()
. |
| 143 template <typename T> friend class GrPendingProgramElement; | 143 template <typename T> friend class GrPendingProgramElement; |
| 144 | 144 |
| 145 typedef SkNoncopyable INHERITED; | 145 typedef SkNoncopyable INHERITED; |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 #endif | 148 #endif |
| OLD | NEW |