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

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

Issue 2176333002: Remove SkSurface::MakeRenderTargetDirect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up Created 4 years, 4 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/SkGpuDevice.h » ('j') | src/gpu/SkGpuDevice.h » ('J')
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 * Helper version of NewRaster. It creates a SkImageInfo with the 73 * Helper version of NewRaster. It creates a SkImageInfo with the
74 * specified width and height, and populates the rest of info to match 74 * specified width and height, and populates the rest of info to match
75 * pixels in SkPMColor format. 75 * pixels in SkPMColor format.
76 */ 76 */
77 static sk_sp<SkSurface> MakeRasterN32Premul(int width, int height, 77 static sk_sp<SkSurface> MakeRasterN32Premul(int width, int height,
78 const SkSurfaceProps* props = nu llptr) { 78 const SkSurfaceProps* props = nu llptr) {
79 return MakeRaster(SkImageInfo::MakeN32Premul(width, height), props); 79 return MakeRaster(SkImageInfo::MakeN32Premul(width, height), props);
80 } 80 }
81 81
82 /** 82 /**
83 * Return a new surface using the specified render target.
84 */
85 static sk_sp<SkSurface> MakeRenderTargetDirect(GrRenderTarget*, sk_sp<SkColo rSpace> colorSpace,
86 const SkSurfaceProps* = nullp tr);
87
88 /**
89 * Used to wrap a pre-existing backend 3D API texture as a SkSurface. The k RenderTarget flag 83 * Used to wrap a pre-existing backend 3D API texture as a SkSurface. The k RenderTarget flag
90 * must be set on GrBackendTextureDesc for this to succeed. Skia will not a ssume ownership 84 * must be set on GrBackendTextureDesc for this to succeed. Skia will not a ssume ownership
91 * of the texture and the client must ensure the texture is valid for the l ifetime of the 85 * of the texture and the client must ensure the texture is valid for the l ifetime of the
92 * SkSurface. 86 * SkSurface.
93 */ 87 */
94 static sk_sp<SkSurface> MakeFromBackendTexture(GrContext*, const GrBackendTe xtureDesc&, 88 static sk_sp<SkSurface> MakeFromBackendTexture(GrContext*, const GrBackendTe xtureDesc&,
95 sk_sp<SkColorSpace>, const Sk SurfaceProps*); 89 sk_sp<SkColorSpace>, const Sk SurfaceProps*);
96 90
97 /** 91 /**
98 * Used to wrap a pre-existing 3D API rendering target as a SkSurface. Skia will not assume 92 * Used to wrap a pre-existing 3D API rendering target as a SkSurface. Skia will not assume
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 private: 389 private:
396 const SkSurfaceProps fProps; 390 const SkSurfaceProps fProps;
397 const int fWidth; 391 const int fWidth;
398 const int fHeight; 392 const int fHeight;
399 uint32_t fGenerationID; 393 uint32_t fGenerationID;
400 394
401 typedef SkRefCnt INHERITED; 395 typedef SkRefCnt INHERITED;
402 }; 396 };
403 397
404 #endif 398 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/SkGpuDevice.h » ('j') | src/gpu/SkGpuDevice.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698