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

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

Issue 1943843002: Revert of 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.
90 */ 88 */
91 static sk_sp<SkSurface> MakeFromBackendTexture(GrContext*, const GrBackendTe xtureDesc&, 89 static sk_sp<SkSurface> MakeFromBackendTexture(GrContext*, const GrBackendTe xtureDesc&,
92 const SkSurfaceProps*); 90 const SkSurfaceProps*);
93 91
94 /** 92 /**
95 * Used to wrap a pre-existing 3D API rendering target as a SkSurface. Skia will not assume 93 * Used to wrap a pre-existing 3D API rendering target as a SkSurface. Skia will not assume
96 * ownership of the render target and the client must ensure the render tar get is valid for the 94 * ownership of the render target and the client must ensure the render tar get is valid for the
97 * lifetime of the SkSurface. 95 * lifetime of the SkSurface.
98 */ 96 */
99 static sk_sp<SkSurface> MakeFromBackendRenderTarget(GrContext*, 97 static sk_sp<SkSurface> MakeFromBackendRenderTarget(GrContext*,
100 const GrBackendRenderTar getDesc&, 98 const GrBackendRenderTar getDesc&,
101 const SkSurfaceProps*); 99 const SkSurfaceProps*);
102 100
103 /** 101 /**
104 * Used to wrap a pre-existing 3D API texture as a SkSurface. Skia will tre at the texture as 102 * Used to wrap a pre-existing 3D API texture as a SkSurface. Skia will tre at the texture as
105 * a rendering target only, but unlike NewFromBackendRenderTarget, Skia wil l manage and own 103 * a rendering target only, but unlike NewFromBackendRenderTarget, Skia wil l manage and own
106 * the associated render target objects (but not the provided texture). The kRenderTarget flag 104 * the associated render target objects (but not the provided texture). The kRenderTarget flag
107 * must be set on GrBackendTextureDesc for this to succeed. Skia will not a ssume ownership 105 * must be set on GrBackendTextureDesc for this to succeed. Skia will not a ssume ownership
108 * of the texture and the client must ensure the texture is valid for the l ifetime of the 106 * of the texture and the client must ensure the texture is valid for the l ifetime of the
109 * SkSurface. 107 * SkSurface.
110 *
111 * If the requested sample count is greater than 0, the contents of the sur face are undefined.
112 */ 108 */
113 static sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget( 109 static sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget(
114 GrContext*, const GrBackendTextureDesc&, const SkSurfaceProps*); 110 GrContext*, const GrBackendTextureDesc&, const SkSurfaceProps*);
115 111
116 /** 112 /**
117 * Return a new surface whose contents will be drawn to an offscreen 113 * Return a new surface whose contents will be drawn to an offscreen
118 * render target, allocated by the surface. 114 * render target, allocated by the surface.
119 */ 115 */
120 static sk_sp<SkSurface> MakeRenderTarget( 116 static sk_sp<SkSurface> MakeRenderTarget(
121 GrContext*, SkBudgeted, const SkImageInfo&, int sampleCount, const S kSurfaceProps*); 117 GrContext*, SkBudgeted, const SkImageInfo&, int sampleCount, const S kSurfaceProps*);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 private: 366 private:
371 const SkSurfaceProps fProps; 367 const SkSurfaceProps fProps;
372 const int fWidth; 368 const int fWidth;
373 const int fHeight; 369 const int fHeight;
374 uint32_t fGenerationID; 370 uint32_t fGenerationID;
375 371
376 typedef SkRefCnt INHERITED; 372 typedef SkRefCnt INHERITED;
377 }; 373 };
378 374
379 #endif 375 #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