| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_RESOURCES_RASTER_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_RASTER_WORKER_POOL_H_ |
| 6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_ | 6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_ |
| 7 | 7 |
| 8 #include "cc/resources/rasterizer.h" | 8 #include "cc/resources/rasterizer.h" |
| 9 #include "ui/gfx/geometry/size.h" | 9 #include "ui/gfx/geometry/size.h" |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // represent |task| and all its image decode dependencies in |graph|. | 57 // represent |task| and all its image decode dependencies in |graph|. |
| 58 static void InsertNodesForRasterTask( | 58 static void InsertNodesForRasterTask( |
| 59 TaskGraph* graph, | 59 TaskGraph* graph, |
| 60 RasterTask* task, | 60 RasterTask* task, |
| 61 const ImageDecodeTask::Vector& decode_tasks, | 61 const ImageDecodeTask::Vector& decode_tasks, |
| 62 unsigned priority); | 62 unsigned priority); |
| 63 | 63 |
| 64 // Utility functions that transparently create a temporary bitmap and copy | 64 // Utility functions that transparently create a temporary bitmap and copy |
| 65 // pixels to buffer when necessary. | 65 // pixels to buffer when necessary. |
| 66 static void AcquireBitmapForBuffer(SkBitmap* bitmap, | 66 static void AcquireBitmapForBuffer(SkBitmap* bitmap, |
| 67 uint8_t* buffer, | 67 void* buffer, |
| 68 ResourceFormat format, | 68 ResourceFormat format, |
| 69 const gfx::Size& size, | 69 const gfx::Size& size, |
| 70 int stride); | 70 int stride); |
| 71 static void ReleaseBitmapForBuffer(SkBitmap* bitmap, | 71 static void ReleaseBitmapForBuffer(SkBitmap* bitmap, |
| 72 uint8_t* buffer, | 72 void* buffer, |
| 73 ResourceFormat format); | 73 ResourceFormat format); |
| 74 | 74 |
| 75 // Type-checking downcast routine. | 75 // Type-checking downcast routine. |
| 76 virtual Rasterizer* AsRasterizer() = 0; | 76 virtual Rasterizer* AsRasterizer() = 0; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace cc | 79 } // namespace cc |
| 80 | 80 |
| 81 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ | 81 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ |
| OLD | NEW |