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

Side by Side Diff: include/gpu/GrTextureProvider.h

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 years, 1 month 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 | « include/gpu/GrGpuResourceRef.h ('k') | include/gpu/GrXferProcessor.h » ('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 GrTextureProvider_DEFINED 8 #ifndef GrTextureProvider_DEFINED
9 #define GrTextureProvider_DEFINED 9 #define GrTextureProvider_DEFINED
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Wrapped Backend Surfaces 91 // Wrapped Backend Surfaces
92 92
93 /** 93 /**
94 * Wraps an existing texture with a GrTexture object. 94 * Wraps an existing texture with a GrTexture object.
95 * 95 *
96 * OpenGL: if the object is a texture Gr may change its GL texture params 96 * OpenGL: if the object is a texture Gr may change its GL texture params
97 * when it is drawn. 97 * when it is drawn.
98 * 98 *
99 * @return GrTexture object or NULL on failure. 99 * @return GrTexture object or NULL on failure.
100 */ 100 */
101 GrTexture* wrapBackendTexture(const GrBackendTextureDesc& desc, 101 sk_sp<GrTexture> wrapBackendTexture(const GrBackendTextureDesc& desc,
102 GrWrapOwnership = kBorrow_GrWrapOwnership); 102 GrWrapOwnership = kBorrow_GrWrapOwnershi p);
103 103
104 /** 104 /**
105 * Wraps an existing render target with a GrRenderTarget object. It is 105 * Wraps an existing render target with a GrRenderTarget object. It is
106 * similar to wrapBackendTexture but can be used to draw into surfaces 106 * similar to wrapBackendTexture but can be used to draw into surfaces
107 * that are not also textures (e.g. FBO 0 in OpenGL, or an MSAA buffer that 107 * that are not also textures (e.g. FBO 0 in OpenGL, or an MSAA buffer that
108 * the client will resolve to a texture). Currently wrapped render targets 108 * the client will resolve to a texture). Currently wrapped render targets
109 * always use the kBorrow_GrWrapOwnership semantics. 109 * always use the kBorrow_GrWrapOwnership semantics.
110 * 110 *
111 * @return GrRenderTarget object or NULL on failure. 111 * @return GrRenderTarget object or NULL on failure.
112 */ 112 */
113 GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc& de sc); 113 sk_sp<GrRenderTarget> wrapBackendRenderTarget(const GrBackendRenderTargetDe sc& desc);
114 114
115 protected: 115 protected:
116 GrTextureProvider(GrGpu* gpu, GrResourceCache* cache, GrSingleOwner* singleO wner); 116 GrTextureProvider(GrGpu* gpu, GrResourceCache* cache, GrSingleOwner* singleO wner);
117 117
118 /** 118 /**
119 * Assigns a unique key to a resource. If the key is associated with another resource that 119 * Assigns a unique key to a resource. If the key is associated with another resource that
120 * association is removed and replaced by this resource. 120 * association is removed and replaced by this resource.
121 */ 121 */
122 void assignUniqueKeyToResource(const GrUniqueKey&, GrGpuResource*); 122 void assignUniqueKeyToResource(const GrUniqueKey&, GrGpuResource*);
123 123
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 private: 165 private:
166 GrResourceCache* fCache; 166 GrResourceCache* fCache;
167 GrGpu* fGpu; 167 GrGpu* fGpu;
168 168
169 // In debug builds we guard against improper thread handling 169 // In debug builds we guard against improper thread handling
170 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) 170 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;)
171 }; 171 };
172 172
173 #endif 173 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrGpuResourceRef.h ('k') | include/gpu/GrXferProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698