| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 TextureUploader_h | 5 #ifndef TextureUploader_h |
| 6 #define TextureUploader_h | 6 #define TextureUploader_h |
| 7 | 7 |
| 8 #include "LayerTextureUpdater.h" | 8 #include "IntRect.h" |
| 9 |
| 10 class SkBitmap; |
| 11 class SkPicture; |
| 9 | 12 |
| 10 namespace cc { | 13 namespace cc { |
| 11 | 14 |
| 15 class CCPrioritizedTexture; |
| 16 class CCResourceProvider; |
| 17 |
| 12 class TextureUploader { | 18 class TextureUploader { |
| 13 public: | 19 public: |
| 14 struct Parameters { | 20 struct Geometry { |
| 15 LayerTextureUpdater::Texture* texture; | 21 IntRect contentRect; |
| 16 IntRect sourceRect; | 22 IntRect sourceRect; |
| 17 IntSize destOffset; | 23 IntSize destOffset; |
| 18 }; | 24 }; |
| 25 struct Parameters { |
| 26 CCPrioritizedTexture* texture; |
| 27 const SkBitmap* bitmap; |
| 28 SkPicture* picture; |
| 29 Geometry geometry; |
| 30 }; |
| 19 | 31 |
| 20 virtual ~TextureUploader() { } | 32 virtual ~TextureUploader() { } |
| 21 | 33 |
| 22 virtual size_t numBlockingUploads() = 0; | 34 virtual size_t numBlockingUploads() = 0; |
| 23 virtual void markPendingUploadsAsNonBlocking() = 0; | 35 virtual void markPendingUploadsAsNonBlocking() = 0; |
| 24 | 36 |
| 25 // Returns our throughput on the GPU process | 37 // Returns our throughput on the GPU process |
| 26 virtual double estimatedTexturesPerSecond() = 0; | 38 virtual double estimatedTexturesPerSecond() = 0; |
| 27 virtual void uploadTexture(CCResourceProvider*, Parameters) = 0; | 39 virtual void uploadTexture(CCResourceProvider*, Parameters) = 0; |
| 28 }; | 40 }; |
| 29 | 41 |
| 30 } | 42 } |
| 31 | 43 |
| 32 #endif | 44 #endif |
| OLD | NEW |