OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "SkCanvasStateUtils.h" | 8 #include "SkCanvasStateUtils.h" |
9 | 9 |
10 #include "SkBitmapDevice.h" | 10 #include "SkBitmapDevice.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 CanvasBackend type; | 53 CanvasBackend type; |
54 int32_t x, y; | 54 int32_t x, y; |
55 int32_t width; | 55 int32_t width; |
56 int32_t height; | 56 int32_t height; |
57 | 57 |
58 SkMCState mcState; | 58 SkMCState mcState; |
59 | 59 |
60 union { | 60 union { |
61 struct { | 61 struct { |
62 RasterConfig config; // pixel format: a value from RasterConfigs. | 62 RasterConfig config; // pixel format: a value from RasterConfigs. |
63 uint32_t rowBytes; // Number of bytes from start of one line to ne
xt. | 63 size_t rowBytes; // Number of bytes from start of one line to ne
xt. |
64 void* pixels; // The pixels, all (height * rowBytes) of them. | 64 void* pixels; // The pixels, all (height * rowBytes) of them. |
65 } raster; | 65 } raster; |
66 struct { | 66 struct { |
67 int32_t textureID; | 67 int32_t textureID; |
68 } gpu; | 68 } gpu; |
69 }; | 69 }; |
70 }; | 70 }; |
71 | 71 |
72 class SkCanvasState { | 72 class SkCanvasState { |
73 public: | 73 public: |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 } | 334 } |
335 | 335 |
336 return canvas.detach(); | 336 return canvas.detach(); |
337 } | 337 } |
338 | 338 |
339 //////////////////////////////////////////////////////////////////////////////// | 339 //////////////////////////////////////////////////////////////////////////////// |
340 | 340 |
341 void SkCanvasStateUtils::ReleaseCanvasState(SkCanvasState* state) { | 341 void SkCanvasStateUtils::ReleaseCanvasState(SkCanvasState* state) { |
342 SkDELETE(state); | 342 SkDELETE(state); |
343 } | 343 } |
OLD | NEW |