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

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

Issue 2440393002: [tracing] Implement composable memory usage estimators. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « ui/android/resources/crushed_sprite_resource.h ('k') | ui/android/resources/resource_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/trees/layer_tree_host.h" 7 #include "cc/trees/layer_tree_host.h"
8 #include "ui/gfx/android/java_bitmap.h" 8 #include "ui/gfx/android/java_bitmap.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 gfx::Size CrushedSpriteResource::GetScaledSpriteSize() { 54 gfx::Size CrushedSpriteResource::GetScaledSpriteSize() {
55 return scaled_sprite_size_; 55 return scaled_sprite_size_;
56 } 56 }
57 57
58 int CrushedSpriteResource::GetFrameCount() { 58 int CrushedSpriteResource::GetFrameCount() {
59 return src_dst_rects_.size(); 59 return src_dst_rects_.size();
60 } 60 }
61 61
62 size_t CrushedSpriteResource::GetAllocatedSizeInBytes() const { 62 size_t CrushedSpriteResource::EstimateMemoryUsage() const {
63 return bitmap_.getSize(); 63 return bitmap_.getSize();
64 } 64 }
65 65
66 } // namespace ui 66 } // namespace ui
OLDNEW
« no previous file with comments | « ui/android/resources/crushed_sprite_resource.h ('k') | ui/android/resources/resource_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698