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

Side by Side Diff: ui/base/resource/resource_bundle.cc

Issue 1601583002: Cleanup: Remove unused ui::ResourceBundle::ImageRTL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « ui/base/resource/resource_bundle.h ('k') | ui/base/resource/resource_bundle_android.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/base/resource/resource_bundle.h" 5 #include "ui/base/resource/resource_bundle.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <utility> 10 #include <utility>
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 base::AutoLock lock_scope(*images_and_fonts_lock_); 421 base::AutoLock lock_scope(*images_and_fonts_lock_);
422 422
423 // Another thread raced the load and has already cached the image. 423 // Another thread raced the load and has already cached the image.
424 if (images_.count(resource_id)) 424 if (images_.count(resource_id))
425 return images_[resource_id]; 425 return images_[resource_id];
426 426
427 images_[resource_id] = image; 427 images_[resource_id] = image;
428 return images_[resource_id]; 428 return images_[resource_id];
429 } 429 }
430 430
431 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id) {
432 return GetNativeImageNamed(resource_id, RTL_DISABLED);
433 }
434
435 base::RefCountedStaticMemory* ResourceBundle::LoadDataResourceBytes( 431 base::RefCountedStaticMemory* ResourceBundle::LoadDataResourceBytes(
436 int resource_id) const { 432 int resource_id) const {
437 return LoadDataResourceBytesForScale(resource_id, ui::SCALE_FACTOR_NONE); 433 return LoadDataResourceBytesForScale(resource_id, ui::SCALE_FACTOR_NONE);
438 } 434 }
439 435
440 base::RefCountedStaticMemory* ResourceBundle::LoadDataResourceBytesForScale( 436 base::RefCountedStaticMemory* ResourceBundle::LoadDataResourceBytesForScale(
441 int resource_id, 437 int resource_id,
442 ScaleFactor scale_factor) const { 438 ScaleFactor scale_factor) const {
443 base::RefCountedStaticMemory* bytes = NULL; 439 base::RefCountedStaticMemory* bytes = NULL;
444 if (delegate_) 440 if (delegate_)
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 // static 915 // static
920 bool ResourceBundle::DecodePNG(const unsigned char* buf, 916 bool ResourceBundle::DecodePNG(const unsigned char* buf,
921 size_t size, 917 size_t size,
922 SkBitmap* bitmap, 918 SkBitmap* bitmap,
923 bool* fell_back_to_1x) { 919 bool* fell_back_to_1x) {
924 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size); 920 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size);
925 return gfx::PNGCodec::Decode(buf, size, bitmap); 921 return gfx::PNGCodec::Decode(buf, size, bitmap);
926 } 922 }
927 923
928 } // namespace ui 924 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle.h ('k') | ui/base/resource/resource_bundle_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698