Chromium Code Reviews| 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" | 7 #include "cc/resources/scoped_ui_resource.h" |
| 8 #include "cc/trees/layer_tree_host.h" | 8 #include "cc/trees/layer_tree_host.h" |
| 9 #include "ui/gfx/android/java_bitmap.h" | 9 #include "ui/gfx/android/java_bitmap.h" |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 } | 53 } |
| 54 | 54 |
| 55 gfx::Size CrushedSpriteResource::GetScaledSpriteSize() { | 55 gfx::Size CrushedSpriteResource::GetScaledSpriteSize() { |
| 56 return scaled_sprite_size_; | 56 return scaled_sprite_size_; |
| 57 } | 57 } |
| 58 | 58 |
| 59 int CrushedSpriteResource::GetFrameCount() { | 59 int CrushedSpriteResource::GetFrameCount() { |
| 60 return src_dst_rects_.size(); | 60 return src_dst_rects_.size(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 size_t CrushedSpriteResource::BytesUsed() const { | |
| 64 return bitmap_.getSize() + last_frame_resource_ | |
|
Dmitry Skiba
2016/10/13 03:47:03
I would just remove last_frame_resource_, it's not
ssid
2016/10/13 17:45:16
Done.
| |
| 65 ? last_frame_resource_->BytesUsed() | |
| 66 : 0; | |
| 67 } | |
| 68 | |
| 63 } // namespace ui | 69 } // namespace ui |
| OLD | NEW |