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

Side by Side Diff: include/core/SkSurface.h

Issue 1924183003: Make stencils be attachable to render targets created via SkSurface::MakeFromBackendTextureAsRender… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | src/gpu/gl/GrGLGpu.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 2012 Google Inc. 2 * Copyright 2012 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 SkSurface_DEFINED 8 #ifndef SkSurface_DEFINED
9 #define SkSurface_DEFINED 9 #define SkSurface_DEFINED
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 * Return a new surface using the specified render target. 78 * Return a new surface using the specified render target.
79 */ 79 */
80 static sk_sp<SkSurface> MakeRenderTargetDirect(GrRenderTarget*, 80 static sk_sp<SkSurface> MakeRenderTargetDirect(GrRenderTarget*,
81 const SkSurfaceProps* = nullp tr); 81 const SkSurfaceProps* = nullp tr);
82 82
83 /** 83 /**
84 * Used to wrap a pre-existing backend 3D API texture as a SkSurface. The k RenderTarget flag 84 * Used to wrap a pre-existing backend 3D API texture as a SkSurface. The k RenderTarget flag
85 * must be set on GrBackendTextureDesc for this to succeed. Skia will not a ssume ownership 85 * must be set on GrBackendTextureDesc for this to succeed. Skia will not a ssume ownership
86 * of the texture and the client must ensure the texture is valid for the l ifetime of the 86 * of the texture and the client must ensure the texture is valid for the l ifetime of the
87 * SkSurface. 87 * SkSurface.
88 *
89 * If the requested sample count is greater than 0, the contents of the sur face are undefined.
88 */ 90 */
89 static sk_sp<SkSurface> MakeFromBackendTexture(GrContext*, const GrBackendTe xtureDesc&, 91 static sk_sp<SkSurface> MakeFromBackendTexture(GrContext*, const GrBackendTe xtureDesc&,
90 const SkSurfaceProps*); 92 const SkSurfaceProps*);
91 93
92 /** 94 /**
93 * Used to wrap a pre-existing 3D API rendering target as a SkSurface. Skia will not assume 95 * Used to wrap a pre-existing 3D API rendering target as a SkSurface. Skia will not assume
94 * ownership of the render target and the client must ensure the render tar get is valid for the 96 * ownership of the render target and the client must ensure the render tar get is valid for the
95 * lifetime of the SkSurface. 97 * lifetime of the SkSurface.
96 */ 98 */
97 static sk_sp<SkSurface> MakeFromBackendRenderTarget(GrContext*, 99 static sk_sp<SkSurface> MakeFromBackendRenderTarget(GrContext*,
98 const GrBackendRenderTar getDesc&, 100 const GrBackendRenderTar getDesc&,
99 const SkSurfaceProps*); 101 const SkSurfaceProps*);
100 102
101 /** 103 /**
102 * Used to wrap a pre-existing 3D API texture as a SkSurface. Skia will tre at the texture as 104 * Used to wrap a pre-existing 3D API texture as a SkSurface. Skia will tre at the texture as
103 * a rendering target only, but unlike NewFromBackendRenderTarget, Skia wil l manage and own 105 * a rendering target only, but unlike NewFromBackendRenderTarget, Skia wil l manage and own
104 * the associated render target objects (but not the provided texture). The kRenderTarget flag 106 * the associated render target objects (but not the provided texture). The kRenderTarget flag
105 * must be set on GrBackendTextureDesc for this to succeed. Skia will not a ssume ownership 107 * must be set on GrBackendTextureDesc for this to succeed. Skia will not a ssume ownership
106 * of the texture and the client must ensure the texture is valid for the l ifetime of the 108 * of the texture and the client must ensure the texture is valid for the l ifetime of the
107 * SkSurface. 109 * SkSurface.
110 *
111 * If the requested sample count is greater than 0, the contents of the sur face are undefined.
108 */ 112 */
109 static sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget( 113 static sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget(
110 GrContext*, const GrBackendTextureDesc&, const SkSurfaceProps*); 114 GrContext*, const GrBackendTextureDesc&, const SkSurfaceProps*);
111 115
112 /** 116 /**
113 * Return a new surface whose contents will be drawn to an offscreen 117 * Return a new surface whose contents will be drawn to an offscreen
114 * render target, allocated by the surface. 118 * render target, allocated by the surface.
115 */ 119 */
116 static sk_sp<SkSurface> MakeRenderTarget( 120 static sk_sp<SkSurface> MakeRenderTarget(
117 GrContext*, SkBudgeted, const SkImageInfo&, int sampleCount, const S kSurfaceProps*); 121 GrContext*, SkBudgeted, const SkImageInfo&, int sampleCount, const S kSurfaceProps*);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 private: 370 private:
367 const SkSurfaceProps fProps; 371 const SkSurfaceProps fProps;
368 const int fWidth; 372 const int fWidth;
369 const int fHeight; 373 const int fHeight;
370 uint32_t fGenerationID; 374 uint32_t fGenerationID;
371 375
372 typedef SkRefCnt INHERITED; 376 typedef SkRefCnt INHERITED;
373 }; 377 };
374 378
375 #endif 379 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698