| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 const SkSurfaceProps* props) { | 162 const SkSurfaceProps* props) { |
| 163 return MakeFromBackendRenderTarget(ctx, d, props).release(); | 163 return MakeFromBackendRenderTarget(ctx, d, props).release(); |
| 164 } | 164 } |
| 165 static SkSurface* NewFromBackendTextureAsRenderTarget(GrContext* ctx, | 165 static SkSurface* NewFromBackendTextureAsRenderTarget(GrContext* ctx, |
| 166 const GrBackendTexture
Desc& desc, | 166 const GrBackendTexture
Desc& desc, |
| 167 const SkSurfaceProps*
props) { | 167 const SkSurfaceProps*
props) { |
| 168 return MakeFromBackendTextureAsRenderTarget(ctx, desc, props).release(); | 168 return MakeFromBackendTextureAsRenderTarget(ctx, desc, props).release(); |
| 169 } | 169 } |
| 170 static SkSurface* NewRenderTarget(GrContext* ctx, SkBudgeted b, const SkImag
eInfo& info, | 170 static SkSurface* NewRenderTarget(GrContext* ctx, SkBudgeted b, const SkImag
eInfo& info, |
| 171 int sampleCount, const SkSurfaceProps* pro
ps = NULL) { | 171 int sampleCount, const SkSurfaceProps* pro
ps = NULL) { |
| 172 return MakeRenderTarget(ctx, b, info, sampleCount, props, a).release(); | 172 return MakeRenderTarget(ctx, b, info, sampleCount, props).release(); |
| 173 } | 173 } |
| 174 static SkSurface* NewRenderTarget(GrContext* gr, SkBudgeted b, const SkImage
Info& info) { | 174 static SkSurface* NewRenderTarget(GrContext* gr, SkBudgeted b, const SkImage
Info& info) { |
| 175 return NewRenderTarget(gr, b, info, 0); | 175 return NewRenderTarget(gr, b, info, 0); |
| 176 } | 176 } |
| 177 SkSurface* newSurface(const SkImageInfo& info) { return this->makeSurface(in
fo).release(); } | 177 SkSurface* newSurface(const SkImageInfo& info) { return this->makeSurface(in
fo).release(); } |
| 178 #endif | 178 #endif |
| 179 | 179 |
| 180 int width() const { return fWidth; } | 180 int width() const { return fWidth; } |
| 181 int height() const { return fHeight; } | 181 int height() const { return fHeight; } |
| 182 | 182 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 private: | 366 private: |
| 367 const SkSurfaceProps fProps; | 367 const SkSurfaceProps fProps; |
| 368 const int fWidth; | 368 const int fWidth; |
| 369 const int fHeight; | 369 const int fHeight; |
| 370 uint32_t fGenerationID; | 370 uint32_t fGenerationID; |
| 371 | 371 |
| 372 typedef SkRefCnt INHERITED; | 372 typedef SkRefCnt INHERITED; |
| 373 }; | 373 }; |
| 374 | 374 |
| 375 #endif | 375 #endif |
| OLD | NEW |