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

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

Issue 1623653002: skia: Add support for CHROMIUM_image backed textures. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Add a context parameter to function pointers. Created 4 years, 10 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 | include/gpu/GrTypes.h » ('j') | include/gpu/GrTypes.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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 * ownership of the render target and the client must ensure the render tar get is valid for the 107 * ownership of the render target and the client must ensure the render tar get is valid for the
108 * lifetime of the SkSurface. 108 * lifetime of the SkSurface.
109 */ 109 */
110 static SkSurface* NewFromBackendRenderTarget(GrContext*, const GrBackendRend erTargetDesc&, 110 static SkSurface* NewFromBackendRenderTarget(GrContext*, const GrBackendRend erTargetDesc&,
111 const SkSurfaceProps*); 111 const SkSurfaceProps*);
112 112
113 /** 113 /**
114 * Return a new surface whose contents will be drawn to an offscreen 114 * Return a new surface whose contents will be drawn to an offscreen
115 * render target, allocated by the surface. 115 * render target, allocated by the surface.
116 */ 116 */
117 static SkSurface* NewRenderTarget(GrContext*, Budgeted, const SkImageInfo&, int sampleCount, 117 static SkSurface* NewRenderTarget(
118 const SkSurfaceProps* = NULL); 118 GrContext*, Budgeted, const SkImageInfo&, int sampleCount, const SkS urfaceProps* = NULL,
119 GrTextureStorageAllocator = GrTextureStorageAllocator());
119 120
120 static SkSurface* NewRenderTarget(GrContext* gr, Budgeted b, const SkImageIn fo& info) { 121 static SkSurface* NewRenderTarget(GrContext* gr, Budgeted b, const SkImageIn fo& info) {
121 return NewRenderTarget(gr, b, info, 0, NULL); 122 return NewRenderTarget(gr, b, info, 0);
122 } 123 }
123 124
124 int width() const { return fWidth; } 125 int width() const { return fWidth; }
125 int height() const { return fHeight; } 126 int height() const { return fHeight; }
126 127
127 /** 128 /**
128 * Returns a unique non-zero, unique value identifying the content of this 129 * Returns a unique non-zero, unique value identifying the content of this
129 * surface. Each time the content is changed changed, either by drawing 130 * surface. Each time the content is changed changed, either by drawing
130 * into this surface, or explicitly calling notifyContentChanged()) this 131 * into this surface, or explicitly calling notifyContentChanged()) this
131 * method will return a new value. 132 * method will return a new value.
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 private: 282 private:
282 const SkSurfaceProps fProps; 283 const SkSurfaceProps fProps;
283 const int fWidth; 284 const int fWidth;
284 const int fHeight; 285 const int fHeight;
285 uint32_t fGenerationID; 286 uint32_t fGenerationID;
286 287
287 typedef SkRefCnt INHERITED; 288 typedef SkRefCnt INHERITED;
288 }; 289 };
289 290
290 #endif 291 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrTypes.h » ('j') | include/gpu/GrTypes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698