OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "ui/android/resources/crushed_sprite_resource.h" | 5 #include "ui/android/resources/crushed_sprite_resource.h" |
6 | 6 |
7 #include "cc/resources/scoped_ui_resource.h" | |
8 #include "cc/trees/layer_tree_host.h" | 7 #include "cc/trees/layer_tree_host.h" |
9 #include "ui/gfx/android/java_bitmap.h" | 8 #include "ui/gfx/android/java_bitmap.h" |
10 | 9 |
11 namespace ui { | 10 namespace ui { |
12 | 11 |
13 CrushedSpriteResource::CrushedSpriteResource( | 12 CrushedSpriteResource::CrushedSpriteResource( |
14 const SkBitmap& bitmap, | 13 const SkBitmap& bitmap, |
15 const SrcDstRects& src_dst_rects, | 14 const SrcDstRects& src_dst_rects, |
16 gfx::Size unscaled_sprite_size, | 15 gfx::Size unscaled_sprite_size, |
17 gfx::Size scaled_sprite_size) | 16 gfx::Size scaled_sprite_size) |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 52 } |
54 | 53 |
55 gfx::Size CrushedSpriteResource::GetScaledSpriteSize() { | 54 gfx::Size CrushedSpriteResource::GetScaledSpriteSize() { |
56 return scaled_sprite_size_; | 55 return scaled_sprite_size_; |
57 } | 56 } |
58 | 57 |
59 int CrushedSpriteResource::GetFrameCount() { | 58 int CrushedSpriteResource::GetFrameCount() { |
60 return src_dst_rects_.size(); | 59 return src_dst_rects_.size(); |
61 } | 60 } |
62 | 61 |
| 62 size_t CrushedSpriteResource::GetAllocatedSizeInBytes() const { |
| 63 return bitmap_.getSize(); |
| 64 } |
| 65 |
63 } // namespace ui | 66 } // namespace ui |
OLD | NEW |