 Chromium Code Reviews
 Chromium Code Reviews Issue 2325623003:
  Replace IDMap with std::unordered_map in ResourceManager  (Closed)
    
  
    Issue 2325623003:
  Replace IDMap with std::unordered_map in ResourceManager  (Closed) 
  | OLD | NEW | 
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/resource_manager_impl.h" | 5 #include "ui/android/resources/resource_manager_impl.h" | 
| 6 | 6 | 
| 7 #include <stddef.h> | 7 #include <stddef.h> | 
| 8 | 8 | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 #include <vector> | 10 #include <vector> | 
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 ResourceManagerImpl::GetJavaObject() { | 59 ResourceManagerImpl::GetJavaObject() { | 
| 60 return base::android::ScopedJavaLocalRef<jobject>(java_obj_); | 60 return base::android::ScopedJavaLocalRef<jobject>(java_obj_); | 
| 61 } | 61 } | 
| 62 | 62 | 
| 63 ResourceManager::Resource* ResourceManagerImpl::GetResource( | 63 ResourceManager::Resource* ResourceManagerImpl::GetResource( | 
| 64 AndroidResourceType res_type, | 64 AndroidResourceType res_type, | 
| 65 int res_id) { | 65 int res_id) { | 
| 66 DCHECK_GE(res_type, ANDROID_RESOURCE_TYPE_FIRST); | 66 DCHECK_GE(res_type, ANDROID_RESOURCE_TYPE_FIRST); | 
| 67 DCHECK_LE(res_type, ANDROID_RESOURCE_TYPE_LAST); | 67 DCHECK_LE(res_type, ANDROID_RESOURCE_TYPE_LAST); | 
| 68 | 68 | 
| 69 Resource* resource = resources_[res_type].Lookup(res_id); | 69 Resource* resource = nullptr; | 
| 70 if (resources_[res_type].find(res_id) != resources_[res_type].end()) { | |
| 
aelias_OOO_until_Jul13
2016/09/09 21:50:05
nit: no braces for 1-line into 1-line if statement
 
mdjones
2016/09/12 16:55:09
Done.
 | |
| 71 resource = resources_[res_type][res_id].get(); | |
| 72 } | |
| 70 | 73 | 
| 71 if (!resource || res_type == ANDROID_RESOURCE_TYPE_DYNAMIC || | 74 if (!resource || res_type == ANDROID_RESOURCE_TYPE_DYNAMIC || | 
| 72 res_type == ANDROID_RESOURCE_TYPE_DYNAMIC_BITMAP) { | 75 res_type == ANDROID_RESOURCE_TYPE_DYNAMIC_BITMAP) { | 
| 73 RequestResourceFromJava(res_type, res_id); | 76 RequestResourceFromJava(res_type, res_id); | 
| 74 resource = resources_[res_type].Lookup(res_id); | 77 resource = resources_[res_type][res_id].get(); | 
| 75 } | 78 } | 
| 76 | 79 | 
| 77 return resource; | 80 return resource; | 
| 78 } | 81 } | 
| 79 | 82 | 
| 80 void ResourceManagerImpl::RemoveUnusedTints( | 83 void ResourceManagerImpl::RemoveUnusedTints( | 
| 81 const std::unordered_set<int>& used_tints) { | 84 const std::unordered_set<int>& used_tints) { | 
| 82 // Iterate over the currently cached tints and remove ones that were not | 85 // Iterate over the currently cached tints and remove ones that were not | 
| 83 // used as defined in |used_tints|. | 86 // used as defined in |used_tints|. | 
| 84 for (auto it = tinted_resources_.cbegin(); it != tinted_resources_.cend();) { | 87 for (auto it = tinted_resources_.cbegin(); it != tinted_resources_.cend();) { | 
| 85 if (used_tints.find(it->first) == used_tints.end()) { | 88 if (used_tints.find(it->first) == used_tints.end()) { | 
| 86 it = tinted_resources_.erase(it); | 89 it = tinted_resources_.erase(it); | 
| 87 } else { | 90 } else { | 
| 88 ++it; | 91 ++it; | 
| 89 } | 92 } | 
| 90 } | 93 } | 
| 91 } | 94 } | 
| 92 | 95 | 
| 93 ResourceManager::Resource* ResourceManagerImpl::GetStaticResourceWithTint( | 96 ResourceManager::Resource* ResourceManagerImpl::GetStaticResourceWithTint( | 
| 94 int res_id, | 97 int res_id, | 
| 95 int tint_color) { | 98 int tint_color) { | 
| 96 if (tinted_resources_.find(tint_color) == tinted_resources_.end()) { | 99 if (tinted_resources_.find(tint_color) == tinted_resources_.end()) { | 
| 97 tinted_resources_[tint_color] = base::MakeUnique<ResourceMap>(); | 100 tinted_resources_[tint_color] = base::MakeUnique<ResourceMap>(); | 
| 98 } | 101 } | 
| 99 ResourceMap* resource_map = tinted_resources_[tint_color].get(); | 102 ResourceMap* resource_map = tinted_resources_[tint_color].get(); | 
| 100 | 103 | 
| 101 Resource* tinted_resource = resource_map->Lookup(res_id); | 104 // If the resource is already cached, use it. | 
| 105 if (resource_map->find(res_id) != resource_map->end()) | |
| 
aelias_OOO_until_Jul13
2016/09/09 21:50:05
Please put the result of the find in a local varia
 
mdjones
2016/09/12 16:55:09
Done.
 | |
| 106 return (*resource_map)[res_id].get(); | |
| 102 | 107 | 
| 103 // If the resource is already cached, use it. | 108 std::unique_ptr<Resource> tinted_resource = base::MakeUnique<Resource>(); | 
| 104 if (tinted_resource) | |
| 105 return tinted_resource; | |
| 106 | |
| 107 tinted_resource = new Resource(); | |
| 108 | 109 | 
| 109 ResourceManager::Resource* base_image = | 110 ResourceManager::Resource* base_image = | 
| 110 GetResource(ANDROID_RESOURCE_TYPE_STATIC, res_id); | 111 GetResource(ANDROID_RESOURCE_TYPE_STATIC, res_id); | 
| 111 DCHECK(base_image); | 112 DCHECK(base_image); | 
| 112 | 113 | 
| 113 TRACE_EVENT0("browser", "ResourceManagerImpl::GetStaticResourceWithTint"); | 114 TRACE_EVENT0("browser", "ResourceManagerImpl::GetStaticResourceWithTint"); | 
| 114 SkBitmap tinted_bitmap; | 115 SkBitmap tinted_bitmap; | 
| 115 tinted_bitmap.allocPixels(SkImageInfo::MakeN32Premul(base_image->size.width(), | 116 tinted_bitmap.allocPixels(SkImageInfo::MakeN32Premul(base_image->size.width(), | 
| 116 base_image->size.height())); | 117 base_image->size.height())); | 
| 117 | 118 | 
| 118 SkCanvas canvas(tinted_bitmap); | 119 SkCanvas canvas(tinted_bitmap); | 
| 119 canvas.clear(SK_ColorTRANSPARENT); | 120 canvas.clear(SK_ColorTRANSPARENT); | 
| 120 | 121 | 
| 121 // Build a color filter to use on the base resource. This filter multiplies | 122 // Build a color filter to use on the base resource. This filter multiplies | 
| 122 // the RGB components by the components of the new color but retains the | 123 // the RGB components by the components of the new color but retains the | 
| 123 // alpha of the original image. | 124 // alpha of the original image. | 
| 124 SkPaint color_filter; | 125 SkPaint color_filter; | 
| 125 color_filter.setColorFilter( | 126 color_filter.setColorFilter( | 
| 126 SkColorFilter::MakeModeFilter(tint_color, SkXfermode::kModulate_Mode)); | 127 SkColorFilter::MakeModeFilter(tint_color, SkXfermode::kModulate_Mode)); | 
| 127 | 128 | 
| 128 // Draw the resource and make it immutable. | 129 // Draw the resource and make it immutable. | 
| 129 base_image->ui_resource->GetBitmap(base_image->ui_resource->id(), false) | 130 base_image->ui_resource->GetBitmap(base_image->ui_resource->id(), false) | 
| 130 .DrawToCanvas(&canvas, &color_filter); | 131 .DrawToCanvas(&canvas, &color_filter); | 
| 131 tinted_bitmap.setImmutable(); | 132 tinted_bitmap.setImmutable(); | 
| 132 | 133 | 
| 133 // Create a UI resource from the new bitmap. | 134 // Create a UI resource from the new bitmap. | 
| 134 tinted_resource = new Resource(); | |
| 135 tinted_resource->size = gfx::Size(base_image->size); | 135 tinted_resource->size = gfx::Size(base_image->size); | 
| 136 tinted_resource->padding = gfx::Rect(base_image->padding); | 136 tinted_resource->padding = gfx::Rect(base_image->padding); | 
| 137 tinted_resource->aperture = gfx::Rect(base_image->aperture); | 137 tinted_resource->aperture = gfx::Rect(base_image->aperture); | 
| 138 tinted_resource->ui_resource = cc::ScopedUIResource::Create(host_, | 138 tinted_resource->ui_resource = cc::ScopedUIResource::Create(host_, | 
| 139 cc::UIResourceBitmap(tinted_bitmap)); | 139 cc::UIResourceBitmap(tinted_bitmap)); | 
| 140 | 140 | 
| 141 resource_map->AddWithID(tinted_resource, res_id); | 141 (*resource_map)[res_id].swap(tinted_resource); | 
| 142 | 142 | 
| 143 return tinted_resource; | 143 return (*resource_map)[res_id].get(); | 
| 144 } | 144 } | 
| 145 | 145 | 
| 146 void ResourceManagerImpl::ClearTintedResourceCache(JNIEnv* env, | 146 void ResourceManagerImpl::ClearTintedResourceCache(JNIEnv* env, | 
| 147 const JavaRef<jobject>& jobj) { | 147 const JavaRef<jobject>& jobj) { | 
| 148 tinted_resources_.clear(); | 148 tinted_resources_.clear(); | 
| 149 } | 149 } | 
| 150 | 150 | 
| 151 void ResourceManagerImpl::PreloadResource(AndroidResourceType res_type, | 151 void ResourceManagerImpl::PreloadResource(AndroidResourceType res_type, | 
| 152 int res_id) { | 152 int res_id) { | 
| 153 DCHECK_GE(res_type, ANDROID_RESOURCE_TYPE_FIRST); | 153 DCHECK_GE(res_type, ANDROID_RESOURCE_TYPE_FIRST); | 
| 154 DCHECK_LE(res_type, ANDROID_RESOURCE_TYPE_LAST); | 154 DCHECK_LE(res_type, ANDROID_RESOURCE_TYPE_LAST); | 
| 155 | 155 | 
| 156 // Don't send out a query if the resource is already loaded. | 156 // Don't send out a query if the resource is already loaded. | 
| 157 if (resources_[res_type].Lookup(res_id)) | 157 if (resources_[res_type].find(res_id) != resources_[res_type].end()) | 
| 158 return; | 158 return; | 
| 159 | 159 | 
| 160 PreloadResourceFromJava(res_type, res_id); | 160 PreloadResourceFromJava(res_type, res_id); | 
| 161 } | 161 } | 
| 162 | 162 | 
| 163 void ResourceManagerImpl::OnResourceReady(JNIEnv* env, | 163 void ResourceManagerImpl::OnResourceReady(JNIEnv* env, | 
| 164 const JavaRef<jobject>& jobj, | 164 const JavaRef<jobject>& jobj, | 
| 165 jint res_type, | 165 jint res_type, | 
| 166 jint res_id, | 166 jint res_id, | 
| 167 const JavaRef<jobject>& bitmap, | 167 const JavaRef<jobject>& bitmap, | 
| 168 jint padding_left, | 168 jint padding_left, | 
| 169 jint padding_top, | 169 jint padding_top, | 
| 170 jint padding_right, | 170 jint padding_right, | 
| 171 jint padding_bottom, | 171 jint padding_bottom, | 
| 172 jint aperture_left, | 172 jint aperture_left, | 
| 173 jint aperture_top, | 173 jint aperture_top, | 
| 174 jint aperture_right, | 174 jint aperture_right, | 
| 175 jint aperture_bottom) { | 175 jint aperture_bottom) { | 
| 176 DCHECK_GE(res_type, ANDROID_RESOURCE_TYPE_FIRST); | 176 DCHECK_GE(res_type, ANDROID_RESOURCE_TYPE_FIRST); | 
| 177 DCHECK_LE(res_type, ANDROID_RESOURCE_TYPE_LAST); | 177 DCHECK_LE(res_type, ANDROID_RESOURCE_TYPE_LAST); | 
| 178 TRACE_EVENT2("ui", "ResourceManagerImpl::OnResourceReady", | 178 TRACE_EVENT2("ui", "ResourceManagerImpl::OnResourceReady", | 
| 179 "resource_type", res_type, | 179 "resource_type", res_type, | 
| 180 "resource_id", res_id); | 180 "resource_id", res_id); | 
| 181 | 181 | 
| 182 | 182 if (resources_[res_type].find(res_id) == resources_[res_type].end()) { | 
| 
aelias_OOO_until_Jul13
2016/09/09 21:50:05
Please put the result of the find in a local varia
 
mdjones
2016/09/12 16:55:09
Done.
 | |
| 183 Resource* resource = resources_[res_type].Lookup(res_id); | 183 resources_[res_type][res_id].reset(new Resource()); | 
| 184 if (!resource) { | |
| 185 resource = new Resource(); | |
| 186 resources_[res_type].AddWithID(resource, res_id); | |
| 187 } | 184 } | 
| 188 | 185 | 
| 189 gfx::JavaBitmap jbitmap(bitmap.obj()); | 186 gfx::JavaBitmap jbitmap(bitmap.obj()); | 
| 190 resource->size = jbitmap.size(); | 187 resources_[res_type][res_id]->size = jbitmap.size(); | 
| 191 resource->padding.SetRect(padding_left, padding_top, | 188 resources_[res_type][res_id]->padding.SetRect(padding_left, padding_top, | 
| 192 padding_right - padding_left, | 189 padding_right - padding_left, | 
| 193 padding_bottom - padding_top); | 190 padding_bottom - padding_top); | 
| 194 resource->aperture.SetRect(aperture_left, aperture_top, | 191 resources_[res_type][res_id]->aperture.SetRect( | 
| 195 aperture_right - aperture_left, | 192 aperture_left, aperture_top, | 
| 196 aperture_bottom - aperture_top); | 193 aperture_right - aperture_left, | 
| 194 aperture_bottom - aperture_top); | |
| 197 | 195 | 
| 198 SkBitmap skbitmap = gfx::CreateSkBitmapFromJavaBitmap(jbitmap); | 196 SkBitmap skbitmap = gfx::CreateSkBitmapFromJavaBitmap(jbitmap); | 
| 199 skbitmap.setImmutable(); | 197 skbitmap.setImmutable(); | 
| 200 resource->ui_resource = | 198 resources_[res_type][res_id]->ui_resource = | 
| 201 cc::ScopedUIResource::Create(host_, cc::UIResourceBitmap(skbitmap)); | 199 cc::ScopedUIResource::Create(host_, cc::UIResourceBitmap(skbitmap)); | 
| 202 } | 200 } | 
| 203 | 201 | 
| 204 CrushedSpriteResource* ResourceManagerImpl::GetCrushedSpriteResource( | 202 CrushedSpriteResource* ResourceManagerImpl::GetCrushedSpriteResource( | 
| 205 int bitmap_res_id, int metadata_res_id) { | 203 int bitmap_res_id, int metadata_res_id) { | 
| 206 CrushedSpriteResource* resource = | 204 | 
| 207 crushed_sprite_resources_.Lookup(bitmap_res_id); | 205 CrushedSpriteResource* resource = nullptr; | 
| 206 if (crushed_sprite_resources_.find(bitmap_res_id) | |
| 207 != crushed_sprite_resources_.end()) { | |
| 208 resource = crushed_sprite_resources_[bitmap_res_id].get(); | |
| 209 } | |
| 210 | |
| 208 if (!resource) { | 211 if (!resource) { | 
| 209 RequestCrushedSpriteResourceFromJava(bitmap_res_id, metadata_res_id, false); | 212 RequestCrushedSpriteResourceFromJava(bitmap_res_id, metadata_res_id, false); | 
| 210 resource = crushed_sprite_resources_.Lookup(bitmap_res_id); | 213 resource = crushed_sprite_resources_[bitmap_res_id].get(); | 
| 211 } else if (resource->BitmapHasBeenEvictedFromMemory()) { | 214 } else if (resource->BitmapHasBeenEvictedFromMemory()) { | 
| 212 RequestCrushedSpriteResourceFromJava(bitmap_res_id, metadata_res_id, true); | 215 RequestCrushedSpriteResourceFromJava(bitmap_res_id, metadata_res_id, true); | 
| 213 } | 216 } | 
| 214 | 217 | 
| 215 return resource; | 218 return resource; | 
| 216 } | 219 } | 
| 217 | 220 | 
| 218 void ResourceManagerImpl::OnCrushedSpriteResourceReady( | 221 void ResourceManagerImpl::OnCrushedSpriteResourceReady( | 
| 219 JNIEnv* env, | 222 JNIEnv* env, | 
| 220 const JavaRef<jobject>& jobj, | 223 const JavaRef<jobject>& jobj, | 
| 221 jint bitmap_res_id, | 224 jint bitmap_res_id, | 
| 222 const JavaRef<jobject>& bitmap, | 225 const JavaRef<jobject>& bitmap, | 
| 223 const JavaRef<jobjectArray>& frame_rects, | 226 const JavaRef<jobjectArray>& frame_rects, | 
| 224 jint unscaled_sprite_width, | 227 jint unscaled_sprite_width, | 
| 225 jint unscaled_sprite_height, | 228 jint unscaled_sprite_height, | 
| 226 jfloat scaled_sprite_width, | 229 jfloat scaled_sprite_width, | 
| 227 jfloat scaled_sprite_height) { | 230 jfloat scaled_sprite_height) { | 
| 228 // Construct source and destination rectangles for each frame from | 231 // Construct source and destination rectangles for each frame from | 
| 229 // |frame_rects|. | 232 // |frame_rects|. | 
| 230 std::vector<std::vector<int>> all_frame_rects_vector; | 233 std::vector<std::vector<int>> all_frame_rects_vector; | 
| 231 JavaArrayOfIntArrayToIntVector(env, frame_rects.obj(), | 234 JavaArrayOfIntArrayToIntVector(env, frame_rects.obj(), | 
| 232 &all_frame_rects_vector); | 235 &all_frame_rects_vector); | 
| 233 CrushedSpriteResource::SrcDstRects src_dst_rects = | 236 CrushedSpriteResource::SrcDstRects src_dst_rects = | 
| 234 ProcessCrushedSpriteFrameRects(all_frame_rects_vector); | 237 ProcessCrushedSpriteFrameRects(all_frame_rects_vector); | 
| 235 | 238 | 
| 236 SkBitmap skbitmap = | 239 SkBitmap skbitmap = | 
| 237 gfx::CreateSkBitmapFromJavaBitmap(gfx::JavaBitmap(bitmap.obj())); | 240 gfx::CreateSkBitmapFromJavaBitmap(gfx::JavaBitmap(bitmap.obj())); | 
| 238 | 241 | 
| 239 CrushedSpriteResource* resource = new CrushedSpriteResource( | 242 std::unique_ptr<CrushedSpriteResource> resource = | 
| 240 skbitmap, | 243 base::MakeUnique<CrushedSpriteResource>( | 
| 241 src_dst_rects, | 244 skbitmap, | 
| 242 gfx::Size(unscaled_sprite_width, unscaled_sprite_height), | 245 src_dst_rects, | 
| 243 gfx::Size(scaled_sprite_width, scaled_sprite_height)); | 246 gfx::Size(unscaled_sprite_width, unscaled_sprite_height), | 
| 247 gfx::Size(scaled_sprite_width, scaled_sprite_height)); | |
| 244 | 248 | 
| 245 if (crushed_sprite_resources_.Lookup(bitmap_res_id)) { | 249 crushed_sprite_resources_[bitmap_res_id].swap(resource); | 
| 246 crushed_sprite_resources_.Replace(bitmap_res_id, resource); | |
| 247 } else { | |
| 248 crushed_sprite_resources_.AddWithID(resource, bitmap_res_id); | |
| 249 } | |
| 250 } | 250 } | 
| 251 | 251 | 
| 252 CrushedSpriteResource::SrcDstRects | 252 CrushedSpriteResource::SrcDstRects | 
| 253 ResourceManagerImpl::ProcessCrushedSpriteFrameRects( | 253 ResourceManagerImpl::ProcessCrushedSpriteFrameRects( | 
| 254 std::vector<std::vector<int>> frame_rects_vector) { | 254 std::vector<std::vector<int>> frame_rects_vector) { | 
| 255 CrushedSpriteResource::SrcDstRects src_dst_rects; | 255 CrushedSpriteResource::SrcDstRects src_dst_rects; | 
| 256 for (size_t i = 0; i < frame_rects_vector.size(); ++i) { | 256 for (size_t i = 0; i < frame_rects_vector.size(); ++i) { | 
| 257 std::vector<int> frame_ints = frame_rects_vector[i]; | 257 std::vector<int> frame_ints = frame_rects_vector[i]; | 
| 258 CrushedSpriteResource::FrameSrcDstRects frame_src_dst_rects; | 258 CrushedSpriteResource::FrameSrcDstRects frame_src_dst_rects; | 
| 259 | 259 | 
| (...skipping 16 matching lines...) Expand all Loading... | |
| 276 src_dst_rects.push_back(frame_src_dst_rects); | 276 src_dst_rects.push_back(frame_src_dst_rects); | 
| 277 } | 277 } | 
| 278 return src_dst_rects; | 278 return src_dst_rects; | 
| 279 } | 279 } | 
| 280 | 280 | 
| 281 void ResourceManagerImpl::OnCrushedSpriteResourceReloaded( | 281 void ResourceManagerImpl::OnCrushedSpriteResourceReloaded( | 
| 282 JNIEnv* env, | 282 JNIEnv* env, | 
| 283 const JavaRef<jobject>& jobj, | 283 const JavaRef<jobject>& jobj, | 
| 284 jint bitmap_res_id, | 284 jint bitmap_res_id, | 
| 285 const JavaRef<jobject>& bitmap) { | 285 const JavaRef<jobject>& bitmap) { | 
| 286 CrushedSpriteResource* resource = | 286 if (crushed_sprite_resources_.find(bitmap_res_id) | 
| 
aelias_OOO_until_Jul13
2016/09/09 21:50:05
Please put the result of the find in a local varia
 
mdjones
2016/09/12 16:55:09
Done.
 | |
| 287 crushed_sprite_resources_.Lookup(bitmap_res_id); | 287 == crushed_sprite_resources_.end()) { | 
| 288 if (!resource) { | |
| 289 // Cannot reload a resource that has not been previously loaded. | 288 // Cannot reload a resource that has not been previously loaded. | 
| 290 return; | 289 return; | 
| 291 } | 290 } | 
| 292 SkBitmap skbitmap = | 291 SkBitmap skbitmap = | 
| 293 gfx::CreateSkBitmapFromJavaBitmap(gfx::JavaBitmap(bitmap.obj())); | 292 gfx::CreateSkBitmapFromJavaBitmap(gfx::JavaBitmap(bitmap.obj())); | 
| 294 resource->SetBitmap(skbitmap); | 293 crushed_sprite_resources_[bitmap_res_id]->SetBitmap(skbitmap); | 
| 295 } | 294 } | 
| 296 | 295 | 
| 297 // static | 296 // static | 
| 298 bool ResourceManagerImpl::RegisterResourceManager(JNIEnv* env) { | 297 bool ResourceManagerImpl::RegisterResourceManager(JNIEnv* env) { | 
| 299 return RegisterNativesImpl(env); | 298 return RegisterNativesImpl(env); | 
| 300 } | 299 } | 
| 301 | 300 | 
| 302 void ResourceManagerImpl::PreloadResourceFromJava(AndroidResourceType res_type, | 301 void ResourceManagerImpl::PreloadResourceFromJava(AndroidResourceType res_type, | 
| 303 int res_id) { | 302 int res_id) { | 
| 304 TRACE_EVENT2("ui", "ResourceManagerImpl::PreloadResourceFromJava", | 303 TRACE_EVENT2("ui", "ResourceManagerImpl::PreloadResourceFromJava", | 
| (...skipping 17 matching lines...) Expand all Loading... | |
| 322 TRACE_EVENT2("ui", | 321 TRACE_EVENT2("ui", | 
| 323 "ResourceManagerImpl::RequestCrushedSpriteResourceFromJava", | 322 "ResourceManagerImpl::RequestCrushedSpriteResourceFromJava", | 
| 324 "bitmap_res_id", bitmap_res_id, | 323 "bitmap_res_id", bitmap_res_id, | 
| 325 "metadata_res_id", metadata_res_id); | 324 "metadata_res_id", metadata_res_id); | 
| 326 Java_ResourceManager_crushedSpriteResourceRequested( | 325 Java_ResourceManager_crushedSpriteResourceRequested( | 
| 327 base::android::AttachCurrentThread(), java_obj_, bitmap_res_id, | 326 base::android::AttachCurrentThread(), java_obj_, bitmap_res_id, | 
| 328 metadata_res_id, reloading); | 327 metadata_res_id, reloading); | 
| 329 } | 328 } | 
| 330 | 329 | 
| 331 } // namespace ui | 330 } // namespace ui | 
| OLD | NEW |