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

Side by Side Diff: include/private/GrTextureProxy.h

Issue 2301523003: Have GrSurfaceProxys and GrGpuResources draw from the same pool of unique ids (Closed)
Patch Set: update to ToT Created 4 years, 3 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 | « include/private/GrSurfaceProxy.h ('k') | src/gpu/GrDrawTarget.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 2016 Google Inc. 2 * Copyright 2016 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 GrTextureProxy_DEFINED 8 #ifndef GrTextureProxy_DEFINED
9 #define GrTextureProxy_DEFINED 9 #define GrTextureProxy_DEFINED
10 10
(...skipping 12 matching lines...) Expand all
23 static sk_sp<GrTextureProxy> Make(sk_sp<GrTexture>); 23 static sk_sp<GrTextureProxy> Make(sk_sp<GrTexture>);
24 24
25 // TODO: add asRenderTargetProxy variants 25 // TODO: add asRenderTargetProxy variants
26 GrTextureProxy* asTextureProxy() override { return this; } 26 GrTextureProxy* asTextureProxy() override { return this; }
27 const GrTextureProxy* asTextureProxy() const override { return this; } 27 const GrTextureProxy* asTextureProxy() const override { return this; }
28 28
29 // Actually instantiate the backing texture, if necessary 29 // Actually instantiate the backing texture, if necessary
30 GrTexture* instantiate(GrTextureProvider* texProvider); 30 GrTexture* instantiate(GrTextureProvider* texProvider);
31 31
32 private: 32 private:
33 GrTextureProxy(const GrSurfaceDesc& desc, SkBackingFit fit, SkBudgeted budge ted, 33 // Deferred version
34 const void* /*srcData*/, size_t /*rowBytes*/) 34 GrTextureProxy(const GrSurfaceDesc& srcDesc, SkBackingFit, SkBudgeted,
35 : INHERITED(desc, fit, budgeted) { 35 const void* srcData, size_t srcRowBytes);
36 // TODO: Handle 'srcData' here
37 }
38
39 // Wrapped version 36 // Wrapped version
40 GrTextureProxy(sk_sp<GrTexture> tex); 37 GrTextureProxy(sk_sp<GrTexture> tex);
41 38
42 // For wrapped textures we store it here. 39 // For wrapped textures we store it here.
43 // For deferred proxies we will fill this in when we need to instantiate the deferred resource 40 // For deferred proxies we will fill this in when we need to instantiate the deferred resource
44 sk_sp<GrTexture> fTexture; 41 sk_sp<GrTexture> fTexture;
45 42
46 typedef GrSurfaceProxy INHERITED; 43 typedef GrSurfaceProxy INHERITED;
47 }; 44 };
48 45
49 #endif 46 #endif
OLDNEW
« no previous file with comments | « include/private/GrSurfaceProxy.h ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698