| OLD | NEW |
| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 const SkSurfaceProps* props) { | 171 const SkSurfaceProps* props) { |
| 172 return MakeRaster(info, rowBytes, props).release(); | 172 return MakeRaster(info, rowBytes, props).release(); |
| 173 } | 173 } |
| 174 static SkSurface* NewRaster(const SkImageInfo& info, const SkSurfaceProps* p
rops = NULL) { | 174 static SkSurface* NewRaster(const SkImageInfo& info, const SkSurfaceProps* p
rops = NULL) { |
| 175 return MakeRaster(info, props).release(); | 175 return MakeRaster(info, props).release(); |
| 176 } | 176 } |
| 177 static SkSurface* NewRasterN32Premul(int width, int height, | 177 static SkSurface* NewRasterN32Premul(int width, int height, |
| 178 const SkSurfaceProps* props = NULL) { | 178 const SkSurfaceProps* props = NULL) { |
| 179 return NewRaster(SkImageInfo::MakeN32Premul(width, height), props); | 179 return NewRaster(SkImageInfo::MakeN32Premul(width, height), props); |
| 180 } | 180 } |
| 181 static SkSurface* NewRenderTargetDirect(GrRenderTarget* rt, const SkSurfaceP
rops* props) { | |
| 182 return MakeRenderTargetDirect(rt, nullptr, props).release(); | |
| 183 } | |
| 184 static SkSurface* NewRenderTargetDirect(GrRenderTarget* target) { | |
| 185 return NewRenderTargetDirect(target, NULL); | |
| 186 } | |
| 187 static SkSurface* NewFromBackendTexture(GrContext* ctx, const GrBackendTextu
reDesc& desc, | 181 static SkSurface* NewFromBackendTexture(GrContext* ctx, const GrBackendTextu
reDesc& desc, |
| 188 const SkSurfaceProps* props) { | 182 const SkSurfaceProps* props) { |
| 189 return MakeFromBackendTexture(ctx, desc, props).release(); | 183 return MakeFromBackendTexture(ctx, desc, props).release(); |
| 190 } | 184 } |
| 191 // Legacy alias | 185 // Legacy alias |
| 192 static SkSurface* NewWrappedRenderTarget(GrContext* ctx, const GrBackendText
ureDesc& desc, | 186 static SkSurface* NewWrappedRenderTarget(GrContext* ctx, const GrBackendText
ureDesc& desc, |
| 193 const SkSurfaceProps* props) { | 187 const SkSurfaceProps* props) { |
| 194 return NewFromBackendTexture(ctx, desc, props); | 188 return NewFromBackendTexture(ctx, desc, props); |
| 195 } | 189 } |
| 196 static SkSurface* NewFromBackendRenderTarget(GrContext* ctx, const GrBackend
RenderTargetDesc& d, | 190 static SkSurface* NewFromBackendRenderTarget(GrContext* ctx, const GrBackend
RenderTargetDesc& d, |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 private: | 395 private: |
| 402 const SkSurfaceProps fProps; | 396 const SkSurfaceProps fProps; |
| 403 const int fWidth; | 397 const int fWidth; |
| 404 const int fHeight; | 398 const int fHeight; |
| 405 uint32_t fGenerationID; | 399 uint32_t fGenerationID; |
| 406 | 400 |
| 407 typedef SkRefCnt INHERITED; | 401 typedef SkRefCnt INHERITED; |
| 408 }; | 402 }; |
| 409 | 403 |
| 410 #endif | 404 #endif |
| OLD | NEW |