robertphillips | 4fd74ae | 2016-08-03 14:26:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrContextPriv_DEFINED |
| 9 | #define GrContextPriv_DEFINED |
| 10 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 11 | #include "include/gpu/GrContext.h" |
| 12 | #include "src/gpu/GrSurfaceContext.h" |
| 13 | #include "src/gpu/text/GrAtlasManager.h" |
robertphillips | 4fd74ae | 2016-08-03 14:26:53 -0700 | [diff] [blame] | 14 | |
Greg Daniel | 4065d45 | 2018-11-16 15:43:41 -0500 | [diff] [blame] | 15 | class GrBackendFormat; |
Greg Daniel | bcf612b | 2017-05-01 13:50:58 +0000 | [diff] [blame] | 16 | class GrBackendRenderTarget; |
Robert Phillips | c994a93 | 2018-06-19 13:09:54 -0400 | [diff] [blame] | 17 | class GrOpMemoryPool; |
Brian Salomon | d17f658 | 2017-07-19 18:28:58 -0400 | [diff] [blame] | 18 | class GrOnFlushCallbackObject; |
Greg Daniel | d85f97d | 2017-03-07 13:37:21 -0500 | [diff] [blame] | 19 | class GrSemaphore; |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 20 | class GrSurfaceProxy; |
| 21 | |
Robert Phillips | 6200036 | 2018-02-01 09:10:04 -0500 | [diff] [blame] | 22 | class SkDeferredDisplayList; |
Robert Phillips | bc42944 | 2019-02-20 08:26:03 -0500 | [diff] [blame] | 23 | class SkTaskGroup; |
Robert Phillips | 6200036 | 2018-02-01 09:10:04 -0500 | [diff] [blame] | 24 | |
robertphillips | 4fd74ae | 2016-08-03 14:26:53 -0700 | [diff] [blame] | 25 | /** Class that adds methods to GrContext that are only intended for use internal to Skia. |
| 26 | This class is purely a privileged window into GrContext. It should never have additional |
| 27 | data members or virtual methods. */ |
| 28 | class GrContextPriv { |
| 29 | public: |
Robert Phillips | 4217ea7 | 2019-01-30 13:08:28 -0500 | [diff] [blame] | 30 | |
| 31 | // from GrContext_Base |
Robert Phillips | fd0d970 | 2019-02-01 10:19:42 -0500 | [diff] [blame] | 32 | uint32_t contextID() const { return fContext->contextID(); } |
Robert Phillips | 4217ea7 | 2019-01-30 13:08:28 -0500 | [diff] [blame] | 33 | |
Robert Phillips | fe0963c | 2019-02-07 13:25:07 -0500 | [diff] [blame] | 34 | bool matches(GrContext_Base* candidate) const { return fContext->matches(candidate); } |
| 35 | |
Robert Phillips | c1541ae | 2019-02-04 12:05:37 -0500 | [diff] [blame] | 36 | const GrContextOptions& options() const { return fContext->options(); } |
| 37 | |
Robert Phillips | bb60677 | 2019-02-04 17:50:57 -0500 | [diff] [blame] | 38 | const GrCaps* caps() const { return fContext->caps(); } |
Robert Phillips | a41c685 | 2019-02-07 10:44:10 -0500 | [diff] [blame] | 39 | sk_sp<const GrCaps> refCaps() const; |
Robert Phillips | bb60677 | 2019-02-04 17:50:57 -0500 | [diff] [blame] | 40 | |
Robert Phillips | a41c685 | 2019-02-07 10:44:10 -0500 | [diff] [blame] | 41 | GrImageContext* asImageContext() { return fContext->asImageContext(); } |
| 42 | GrRecordingContext* asRecordingContext() { return fContext->asRecordingContext(); } |
| 43 | GrContext* asDirectContext() { return fContext->asDirectContext(); } |
| 44 | |
Robert Phillips | 4217ea7 | 2019-01-30 13:08:28 -0500 | [diff] [blame] | 45 | // from GrImageContext |
Robert Phillips | a41c685 | 2019-02-07 10:44:10 -0500 | [diff] [blame] | 46 | GrProxyProvider* proxyProvider() { return fContext->proxyProvider(); } |
| 47 | const GrProxyProvider* proxyProvider() const { return fContext->proxyProvider(); } |
| 48 | |
Robert Phillips | 6a6de56 | 2019-02-15 15:19:15 -0500 | [diff] [blame] | 49 | bool abandoned() const { return fContext->abandoned(); } |
| 50 | |
Robert Phillips | a41c685 | 2019-02-07 10:44:10 -0500 | [diff] [blame] | 51 | /** This is only useful for debug purposes */ |
| 52 | SkDEBUGCODE(GrSingleOwner* singleOwner() const { return fContext->singleOwner(); } ) |
Robert Phillips | 4217ea7 | 2019-01-30 13:08:28 -0500 | [diff] [blame] | 53 | |
| 54 | // from GrRecordingContext |
Robert Phillips | 6f0e02f | 2019-02-13 11:02:28 -0500 | [diff] [blame] | 55 | GrDrawingManager* drawingManager() { return fContext->drawingManager(); } |
Michael Ludwig | 28b0c5d | 2019-12-19 14:51:00 -0500 | [diff] [blame^] | 56 | |
Michael Ludwig | 2c316bd | 2019-12-19 14:50:44 -0500 | [diff] [blame] | 57 | GrOpMemoryPool* opMemoryPool() { return fContext->arenas().opMemoryPool(); } |
| 58 | SkArenaAlloc* recordTimeAllocator() { return fContext->arenas().recordTimeAllocator(); } |
Michael Ludwig | 28b0c5d | 2019-12-19 14:51:00 -0500 | [diff] [blame^] | 59 | GrRecordingContext::Arenas arenas() { return fContext->arenas(); } |
Robert Phillips | d684148 | 2019-02-08 10:29:20 -0500 | [diff] [blame] | 60 | |
Herb Derby | a00da61 | 2019-03-04 17:10:01 -0500 | [diff] [blame] | 61 | GrStrikeCache* getGrStrikeCache() { return fContext->getGrStrikeCache(); } |
Robert Phillips | 2184fb7 | 2019-02-21 16:11:41 -0500 | [diff] [blame] | 62 | GrTextBlobCache* getTextBlobCache() { return fContext->getTextBlobCache(); } |
| 63 | |
Robert Phillips | c5058a6 | 2019-02-15 12:52:59 -0500 | [diff] [blame] | 64 | /** |
| 65 | * Registers an object for flush-related callbacks. (See GrOnFlushCallbackObject.) |
| 66 | * |
| 67 | * NOTE: the drawing manager tracks this object as a raw pointer; it is up to the caller to |
| 68 | * ensure its lifetime is tied to that of the context. |
| 69 | */ |
| 70 | void addOnFlushCallbackObject(GrOnFlushCallbackObject*); |
| 71 | |
Robert Phillips | b97da53 | 2019-02-12 15:24:12 -0500 | [diff] [blame] | 72 | /* |
| 73 | * Create a new render target context backed by a deferred-style |
| 74 | * GrRenderTargetProxy. We guarantee that "asTextureProxy" will succeed for |
| 75 | * renderTargetContexts created via this entry point. |
| 76 | */ |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 77 | std::unique_ptr<GrRenderTargetContext> makeDeferredRenderTargetContext( |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 78 | SkBackingFit fit, |
| 79 | int width, |
| 80 | int height, |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 81 | GrColorType, |
| 82 | sk_sp<SkColorSpace> colorSpace, |
| 83 | int sampleCnt = 1, |
| 84 | GrMipMapped = GrMipMapped::kNo, |
| 85 | GrSurfaceOrigin origin = kBottomLeft_GrSurfaceOrigin, |
| 86 | const SkSurfaceProps* surfaceProps = nullptr, |
| 87 | SkBudgeted = SkBudgeted::kYes, |
Emircan Uysaler | 23ca4e7 | 2019-06-24 10:53:09 -0400 | [diff] [blame] | 88 | GrProtected isProtected = GrProtected::kNo); |
Robert Phillips | b97da53 | 2019-02-12 15:24:12 -0500 | [diff] [blame] | 89 | |
Robert Phillips | 6f0e02f | 2019-02-13 11:02:28 -0500 | [diff] [blame] | 90 | /* |
| 91 | * This method will attempt to create a renderTargetContext that has, at least, the number of |
| 92 | * channels and precision per channel as requested in 'config' (e.g., A8 and 888 can be |
| 93 | * converted to 8888). It may also swizzle the channels (e.g., BGRA -> RGBA). |
| 94 | * SRGB-ness will be preserved. |
| 95 | */ |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 96 | std::unique_ptr<GrRenderTargetContext> makeDeferredRenderTargetContextWithFallback( |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 97 | SkBackingFit fit, |
| 98 | int width, |
| 99 | int height, |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 100 | GrColorType, |
| 101 | sk_sp<SkColorSpace> colorSpace, |
| 102 | int sampleCnt = 1, |
| 103 | GrMipMapped = GrMipMapped::kNo, |
| 104 | GrSurfaceOrigin origin = kBottomLeft_GrSurfaceOrigin, |
| 105 | const SkSurfaceProps* surfaceProps = nullptr, |
Brian Osman | c248659 | 2019-09-20 13:32:51 -0400 | [diff] [blame] | 106 | SkBudgeted budgeted = SkBudgeted::kYes, |
| 107 | GrProtected isProtected = GrProtected::kNo); |
Robert Phillips | 6f0e02f | 2019-02-13 11:02:28 -0500 | [diff] [blame] | 108 | |
Robert Phillips | d684148 | 2019-02-08 10:29:20 -0500 | [diff] [blame] | 109 | GrAuditTrail* auditTrail() { return fContext->auditTrail(); } |
Robert Phillips | 4217ea7 | 2019-01-30 13:08:28 -0500 | [diff] [blame] | 110 | |
Robert Phillips | e42edcc | 2017-12-13 11:50:22 -0500 | [diff] [blame] | 111 | /** |
| 112 | * Create a GrContext without a resource cache |
| 113 | */ |
Kevin Lubick | b5502b2 | 2018-03-12 10:17:06 -0400 | [diff] [blame] | 114 | static sk_sp<GrContext> MakeDDL(const sk_sp<GrContextThreadSafeProxy>&); |
Robert Phillips | e42edcc | 2017-12-13 11:50:22 -0500 | [diff] [blame] | 115 | |
Greg Daniel | 8ce7991 | 2019-02-05 10:08:43 -0500 | [diff] [blame] | 116 | // These match the definitions in SkSurface & GrSurface.h, for whence they came |
| 117 | typedef void* ReleaseContext; |
| 118 | typedef void (*ReleaseProc)(ReleaseContext); |
| 119 | |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 120 | std::unique_ptr<GrRenderTargetContext> makeBackendTextureRenderTargetContext( |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 121 | const GrBackendTexture& tex, |
| 122 | GrSurfaceOrigin origin, |
| 123 | int sampleCnt, |
| 124 | GrColorType, |
| 125 | sk_sp<SkColorSpace> colorSpace, |
| 126 | const SkSurfaceProps* = nullptr, |
| 127 | ReleaseProc = nullptr, |
| 128 | ReleaseContext = nullptr); |
robertphillips | 4fd74ae | 2016-08-03 14:26:53 -0700 | [diff] [blame] | 129 | |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 130 | std::unique_ptr<GrRenderTargetContext> makeBackendRenderTargetRenderTargetContext( |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 131 | const GrBackendRenderTarget&, |
| 132 | GrSurfaceOrigin origin, |
| 133 | GrColorType, |
| 134 | sk_sp<SkColorSpace> colorSpace, |
| 135 | const SkSurfaceProps* = nullptr, |
| 136 | ReleaseProc = nullptr, |
| 137 | ReleaseContext = nullptr); |
robertphillips | 4fd74ae | 2016-08-03 14:26:53 -0700 | [diff] [blame] | 138 | |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 139 | std::unique_ptr<GrRenderTargetContext> makeBackendTextureAsRenderTargetRenderTargetContext( |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 140 | const GrBackendTexture& tex, |
| 141 | GrSurfaceOrigin origin, |
| 142 | int sampleCnt, |
| 143 | GrColorType, |
| 144 | sk_sp<SkColorSpace> colorSpace, |
| 145 | const SkSurfaceProps* = nullptr); |
robertphillips | 4fd74ae | 2016-08-03 14:26:53 -0700 | [diff] [blame] | 146 | |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 147 | std::unique_ptr<GrRenderTargetContext> makeVulkanSecondaryCBRenderTargetContext( |
Greg Daniel | b46add8 | 2019-01-02 14:51:29 -0500 | [diff] [blame] | 148 | const SkImageInfo&, const GrVkDrawableInfo&, const SkSurfaceProps* = nullptr); |
| 149 | |
Robert Phillips | 7ee385e | 2017-03-30 08:02:11 -0400 | [diff] [blame] | 150 | /** |
Brian Salomon | f9a1fdf | 2019-05-09 10:30:12 -0400 | [diff] [blame] | 151 | * Finalizes all pending reads and writes to the surfaces and also performs an MSAA resolves |
| 152 | * if necessary. The GrSurfaceProxy array is treated as a hint. If it is supplied the context |
| 153 | * will guarantee that the draws required for those proxies are flushed but it could do more. |
| 154 | * If no array is provided then all current work will be flushed. |
Robert Phillips | 7ee385e | 2017-03-30 08:02:11 -0400 | [diff] [blame] | 155 | * |
| 156 | * It is not necessary to call this before reading the render target via Skia/GrContext. |
| 157 | * GrContext will detect when it must perform a resolve before reading pixels back from the |
| 158 | * surface or using it as a texture. |
| 159 | */ |
Brian Salomon | f9a1fdf | 2019-05-09 10:30:12 -0400 | [diff] [blame] | 160 | GrSemaphoresSubmitted flushSurfaces(GrSurfaceProxy*[], int numProxies, const GrFlushInfo&); |
| 161 | |
| 162 | /** Version of above that flushes for a single proxy and uses a default GrFlushInfo. Null is |
| 163 | * allowed. */ |
Greg Daniel | 4aa13e7 | 2019-04-15 14:42:20 -0400 | [diff] [blame] | 164 | void flushSurface(GrSurfaceProxy*); |
Robert Phillips | 7ee385e | 2017-03-30 08:02:11 -0400 | [diff] [blame] | 165 | |
Greg Daniel | 6eb8c24 | 2019-06-05 10:22:24 -0400 | [diff] [blame] | 166 | /** |
| 167 | * Returns true if createPMToUPMEffect and createUPMToPMEffect will succeed. In other words, |
| 168 | * did we find a pair of round-trip preserving conversion effects? |
| 169 | */ |
| 170 | bool validPMUPMConversionExists(); |
Robert Phillips | e78b725 | 2017-04-06 07:59:41 -0400 | [diff] [blame] | 171 | |
| 172 | /** |
Greg Daniel | 6eb8c24 | 2019-06-05 10:22:24 -0400 | [diff] [blame] | 173 | * These functions create premul <-> unpremul effects, using the specialized round-trip effects |
| 174 | * from GrConfigConversionEffect. |
Robert Phillips | e78b725 | 2017-04-06 07:59:41 -0400 | [diff] [blame] | 175 | */ |
Greg Daniel | 6eb8c24 | 2019-06-05 10:22:24 -0400 | [diff] [blame] | 176 | std::unique_ptr<GrFragmentProcessor> createPMToUPMEffect(std::unique_ptr<GrFragmentProcessor>); |
| 177 | std::unique_ptr<GrFragmentProcessor> createUPMToPMEffect(std::unique_ptr<GrFragmentProcessor>); |
Robert Phillips | e78b725 | 2017-04-06 07:59:41 -0400 | [diff] [blame] | 178 | |
Brian Osman | 5127998 | 2017-08-23 10:12:00 -0400 | [diff] [blame] | 179 | SkTaskGroup* getTaskGroup() { return fContext->fTaskGroup.get(); } |
| 180 | |
Robert Phillips | 6be756b | 2018-01-16 15:07:54 -0500 | [diff] [blame] | 181 | GrResourceProvider* resourceProvider() { return fContext->fResourceProvider; } |
| 182 | const GrResourceProvider* resourceProvider() const { return fContext->fResourceProvider; } |
| 183 | |
| 184 | GrResourceCache* getResourceCache() { return fContext->fResourceCache; } |
| 185 | |
Robert Phillips | f35fd8d | 2018-01-22 10:48:15 -0500 | [diff] [blame] | 186 | GrGpu* getGpu() { return fContext->fGpu.get(); } |
| 187 | const GrGpu* getGpu() const { return fContext->fGpu.get(); } |
| 188 | |
Robert Phillips | c4039ea | 2018-03-01 11:36:45 -0500 | [diff] [blame] | 189 | // This accessor should only ever be called by the GrOpFlushState. |
Robert Phillips | 5a66efb | 2018-03-07 15:13:18 -0500 | [diff] [blame] | 190 | GrAtlasManager* getAtlasManager() { |
| 191 | return fContext->onGetAtlasManager(); |
Robert Phillips | c4039ea | 2018-03-01 11:36:45 -0500 | [diff] [blame] | 192 | } |
Robert Phillips | f35fd8d | 2018-01-22 10:48:15 -0500 | [diff] [blame] | 193 | |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 194 | void moveRenderTasksToDDL(SkDeferredDisplayList*); |
| 195 | void copyRenderTasksFromDDL(const SkDeferredDisplayList*, GrRenderTargetProxy* newDest); |
Robert Phillips | 6200036 | 2018-02-01 09:10:04 -0500 | [diff] [blame] | 196 | |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 197 | GrContextOptions::PersistentCache* getPersistentCache() { return fContext->fPersistentCache; } |
Brian Osman | 5e7fbfd | 2019-05-03 13:13:35 -0400 | [diff] [blame] | 198 | GrContextOptions::ShaderErrorHandler* getShaderErrorHandler() const { |
| 199 | return fContext->fShaderErrorHandler; |
| 200 | } |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 201 | |
Brian Salomon | 9241a6d | 2019-10-03 13:26:54 -0400 | [diff] [blame] | 202 | GrClientMappedBufferManager* clientMappedBufferManager() { |
| 203 | return fContext->fMappedBufferManager.get(); |
| 204 | } |
| 205 | |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 206 | #if GR_TEST_UTILS |
Robert Phillips | 0c4b7b1 | 2018-03-06 08:20:37 -0500 | [diff] [blame] | 207 | /** Reset GPU stats */ |
| 208 | void resetGpuStats() const ; |
| 209 | |
| 210 | /** Prints cache stats to the string if GR_CACHE_STATS == 1. */ |
| 211 | void dumpCacheStats(SkString*) const; |
| 212 | void dumpCacheStatsKeyValuePairs(SkTArray<SkString>* keys, SkTArray<double>* values) const; |
| 213 | void printCacheStats() const; |
| 214 | |
| 215 | /** Prints GPU stats to the string if GR_GPU_STATS == 1. */ |
| 216 | void dumpGpuStats(SkString*) const; |
| 217 | void dumpGpuStatsKeyValuePairs(SkTArray<SkString>* keys, SkTArray<double>* values) const; |
| 218 | void printGpuStats() const; |
| 219 | |
Robert Phillips | 0c4b7b1 | 2018-03-06 08:20:37 -0500 | [diff] [blame] | 220 | /** Specify the TextBlob cache limit. If the current cache exceeds this limit it will purge. |
| 221 | this is for testing only */ |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 222 | void testingOnly_setTextBlobCacheLimit(size_t bytes); |
Robert Phillips | 0c4b7b1 | 2018-03-06 08:20:37 -0500 | [diff] [blame] | 223 | |
Robert Phillips | 0c4b7b1 | 2018-03-06 08:20:37 -0500 | [diff] [blame] | 224 | /** Get pointer to atlas texture for given mask format. Note that this wraps an |
| 225 | actively mutating texture in an SkImage. This could yield unexpected results |
| 226 | if it gets cached or used more generally. */ |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 227 | sk_sp<SkImage> testingOnly_getFontAtlasImage(GrMaskFormat format, unsigned int index = 0); |
Robert Phillips | 0c4b7b1 | 2018-03-06 08:20:37 -0500 | [diff] [blame] | 228 | |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 229 | /** |
| 230 | * Purge all the unlocked resources from the cache. |
| 231 | * This entry point is mainly meant for timing texture uploads |
| 232 | * and is not defined in normal builds of Skia. |
| 233 | */ |
| 234 | void testingOnly_purgeAllUnlockedResources(); |
Robert Phillips | 0c4b7b1 | 2018-03-06 08:20:37 -0500 | [diff] [blame] | 235 | |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 236 | void testingOnly_flushAndRemoveOnFlushCallbackObject(GrOnFlushCallbackObject*); |
| 237 | #endif |
Robert Phillips | 0c4b7b1 | 2018-03-06 08:20:37 -0500 | [diff] [blame] | 238 | |
robertphillips | 4fd74ae | 2016-08-03 14:26:53 -0700 | [diff] [blame] | 239 | private: |
| 240 | explicit GrContextPriv(GrContext* context) : fContext(context) {} |
Robert Phillips | eb35f4d | 2017-03-21 07:56:47 -0400 | [diff] [blame] | 241 | GrContextPriv(const GrContextPriv&); // unimpl |
robertphillips | 4fd74ae | 2016-08-03 14:26:53 -0700 | [diff] [blame] | 242 | GrContextPriv& operator=(const GrContextPriv&); // unimpl |
| 243 | |
| 244 | // No taking addresses of this type. |
| 245 | const GrContextPriv* operator&() const; |
| 246 | GrContextPriv* operator&(); |
| 247 | |
| 248 | GrContext* fContext; |
| 249 | |
| 250 | friend class GrContext; // to construct/copy this type. |
| 251 | }; |
| 252 | |
Robert Phillips | 9da87e0 | 2019-02-04 13:26:26 -0500 | [diff] [blame] | 253 | inline GrContextPriv GrContext::priv() { return GrContextPriv(this); } |
robertphillips | 4fd74ae | 2016-08-03 14:26:53 -0700 | [diff] [blame] | 254 | |
Robert Phillips | 9da87e0 | 2019-02-04 13:26:26 -0500 | [diff] [blame] | 255 | inline const GrContextPriv GrContext::priv() const { |
robertphillips | 4fd74ae | 2016-08-03 14:26:53 -0700 | [diff] [blame] | 256 | return GrContextPriv(const_cast<GrContext*>(this)); |
| 257 | } |
| 258 | |
| 259 | #endif |