| 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 |
| 11 #include "SkRefCnt.h" | 11 #include "SkRefCnt.h" |
| 12 #include "SkImage.h" | 12 #include "SkImage.h" |
| 13 | 13 |
| 14 class SkCanvas; | 14 class SkCanvas; |
| 15 class SkPaint; | 15 class SkPaint; |
| 16 class GrContext; | 16 class GrContext; |
| 17 class GrRenderTarget; | 17 class GrRenderTarget; |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * SkSurface represents the backend/results of drawing to a canvas. For raster | 20 * SkSurface represents the backend/results of drawing to a canvas. For raster |
| 21 * drawing, the surface will be pixels, but (for example) when drawing into | 21 * drawing, the surface will be pixels, but (for example) when drawing into |
| 22 * a PDF or Picture canvas, the surface stores the recorded commands. | 22 * a PDF or Picture canvas, the surface stores the recorded commands. |
| 23 * | 23 * |
| 24 * To draw into a canvas, first create the appropriate type of Surface, and | 24 * To draw into a canvas, first create the appropriate type of Surface, and |
| 25 * then request the canvas from the surface. | 25 * then request the canvas from the surface. |
| 26 */ | 26 */ |
| 27 class SkSurface : public SkRefCnt { | 27 class SK_API SkSurface : public SkRefCnt { |
| 28 public: | 28 public: |
| 29 SK_DECLARE_INST_COUNT(SkSurface) | 29 SK_DECLARE_INST_COUNT(SkSurface) |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * Create a new surface, using the specified pixels/rowbytes as its | 32 * Create a new surface, using the specified pixels/rowbytes as its |
| 33 * backend. | 33 * backend. |
| 34 * | 34 * |
| 35 * If the requested surface cannot be created, or the request is not a | 35 * If the requested surface cannot be created, or the request is not a |
| 36 * supported configuration, NULL will be returned. | 36 * supported configuration, NULL will be returned. |
| 37 */ | 37 */ |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 const int fWidth; | 135 const int fWidth; |
| 136 const int fHeight; | 136 const int fHeight; |
| 137 uint32_t fGenerationID; | 137 uint32_t fGenerationID; |
| 138 | 138 |
| 139 typedef SkRefCnt INHERITED; | 139 typedef SkRefCnt INHERITED; |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 #endif | 142 #endif |
| OLD | NEW |