| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 SkSpecialSurface_DEFINED | 8 #ifndef SkSpecialSurface_DEFINED |
| 9 #define SkSpecialSurface_DEFINED | 9 #define SkSpecialSurface_DEFINED |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 class SkSpecialSurface : public SkRefCnt { | 28 class SkSpecialSurface : public SkRefCnt { |
| 29 public: | 29 public: |
| 30 const SkSurfaceProps& props() const { return fProps; } | 30 const SkSurfaceProps& props() const { return fProps; } |
| 31 | 31 |
| 32 int width() const { return fSubset.width(); } | 32 int width() const { return fSubset.width(); } |
| 33 int height() const { return fSubset.height(); } | 33 int height() const { return fSubset.height(); } |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * Return a canvas that will draw into this surface. This will always | 36 * Return a canvas that will draw into this surface. This will always |
| 37 * return the same canvas for a given surface, and is managed/owned by the | 37 * return the same canvas for a given surface, and is managed/owned by the |
| 38 * surface. | 38 * surface. |
| 39 * | 39 * |
| 40 * The canvas will be invalid after 'newImageSnapshot' is called. | 40 * The canvas will be invalid after 'newImageSnapshot' is called. |
| 41 */ | 41 */ |
| 42 SkCanvas* getCanvas(); | 42 SkCanvas* getCanvas(); |
| 43 | 43 |
| 44 /** | 44 /** |
| 45 * Returns an image of the current state of the surface pixels up to this | 45 * Returns an image of the current state of the surface pixels up to this |
| 46 * point. The canvas returned by 'getCanvas' becomes invalidated by this | 46 * point. The canvas returned by 'getCanvas' becomes invalidated by this |
| 47 * call and no more drawing to this surface is allowed. | 47 * call and no more drawing to this surface is allowed. |
| 48 * | 48 * |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 const SkSurfaceProps fProps; | 97 const SkSurfaceProps fProps; |
| 98 const SkIRect fSubset; | 98 const SkIRect fSubset; |
| 99 | 99 |
| 100 // TODO: remove this ASAP (see skbug.com/4965) | 100 // TODO: remove this ASAP (see skbug.com/4965) |
| 101 SkImageFilter::Proxy* fProxy; | 101 SkImageFilter::Proxy* fProxy; |
| 102 | 102 |
| 103 typedef SkRefCnt INHERITED; | 103 typedef SkRefCnt INHERITED; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 #endif | 106 #endif |
| OLD | NEW |