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

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

Issue 1565313003: Revert of Add guards to GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@gpudeviceguards
Patch Set: Created 4 years, 11 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/GrDrawContext.cpp ('k') | src/gpu/GrResourceProvider.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 2015 Google Inc. 2 * Copyright 2015 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 GrResourceProvider_DEFINED 8 #ifndef GrResourceProvider_DEFINED
9 #define GrResourceProvider_DEFINED 9 #define GrResourceProvider_DEFINED
10 10
11 #include "GrBatchAtlas.h" 11 #include "GrBatchAtlas.h"
12 #include "GrIndexBuffer.h" 12 #include "GrIndexBuffer.h"
13 #include "GrTextureProvider.h" 13 #include "GrTextureProvider.h"
14 #include "GrPathRange.h" 14 #include "GrPathRange.h"
15 15
16 class GrBatchAtlas; 16 class GrBatchAtlas;
17 class GrIndexBuffer; 17 class GrIndexBuffer;
18 class GrPath; 18 class GrPath;
19 class GrRenderTarget; 19 class GrRenderTarget;
20 class GrSingleOwner;
21 class GrStencilAttachment; 20 class GrStencilAttachment;
22 class GrStrokeInfo; 21 class GrStrokeInfo;
23 class GrVertexBuffer; 22 class GrVertexBuffer;
24 class SkDescriptor; 23 class SkDescriptor;
25 class SkPath; 24 class SkPath;
26 class SkTypeface; 25 class SkTypeface;
27 26
28 /** 27 /**
29 * An extension of the texture provider for arbitrary resource types. This class is intended for 28 * An extension of the texture provider for arbitrary resource types. This class is intended for
30 * use within the Gr code base, not by clients or extensions (e.g. third party G rProcessor 29 * use within the Gr code base, not by clients or extensions (e.g. third party G rProcessor
31 * derivatives). 30 * derivatives).
32 * 31 *
33 * This currently inherits from GrTextureProvider non-publically to force caller s to provider 32 * This currently inherits from GrTextureProvider non-publically to force caller s to provider
34 * make a flags (pendingIO) decision and not use the GrTP methods that don't tak e flags. This 33 * make a flags (pendingIO) decision and not use the GrTP methods that don't tak e flags. This
35 * can be relaxed once https://bug.skia.org/4156 is fixed. 34 * can be relaxed once https://bug.skia.org/4156 is fixed.
36 */ 35 */
37 class GrResourceProvider : protected GrTextureProvider { 36 class GrResourceProvider : protected GrTextureProvider {
38 public: 37 public:
39 GrResourceProvider(GrGpu* gpu, GrResourceCache* cache, GrSingleOwner* owner) ; 38 GrResourceProvider(GrGpu* gpu, GrResourceCache* cache);
40 39
41 template <typename T> T* findAndRefTByUniqueKey(const GrUniqueKey& key) { 40 template <typename T> T* findAndRefTByUniqueKey(const GrUniqueKey& key) {
42 return static_cast<T*>(this->findAndRefResourceByUniqueKey(key)); 41 return static_cast<T*>(this->findAndRefResourceByUniqueKey(key));
43 } 42 }
44 43
45 /** 44 /**
46 * Either finds and refs, or creates an index buffer for instanced drawing w ith a specific 45 * Either finds and refs, or creates an index buffer for instanced drawing w ith a specific
47 * pattern if the index buffer is not found. If the return is non-null, the caller owns 46 * pattern if the index buffer is not found. If the return is non-null, the caller owns
48 * a ref on the returned GrIndexBuffer. 47 * a ref on the returned GrIndexBuffer.
49 * 48 *
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 const GrUniqueKey& key); 154 const GrUniqueKey& key);
156 155
157 const GrIndexBuffer* createQuadIndexBuffer(); 156 const GrIndexBuffer* createQuadIndexBuffer();
158 157
159 GrUniqueKey fQuadIndexBufferKey; 158 GrUniqueKey fQuadIndexBufferKey;
160 159
161 typedef GrTextureProvider INHERITED; 160 typedef GrTextureProvider INHERITED;
162 }; 161 };
163 162
164 #endif 163 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrResourceProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698