Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: ui/android/resources/crushed_sprite_resource.cc

Issue 2406103002: [tracing] Add memory usage of Android UI resources to memory-infra (Closed)
Patch Set: nit. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698