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

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

Issue 132183004: Include 2x assets when enable_hidpi=1 is specified on linux_aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 supported_scale_factors.push_back(SCALE_FACTOR_200P); 564 supported_scale_factors.push_back(SCALE_FACTOR_200P);
565 } else { 565 } else {
566 supported_scale_factors.push_back(SCALE_FACTOR_100P); 566 supported_scale_factors.push_back(SCALE_FACTOR_100P);
567 } 567 }
568 #elif defined(OS_MACOSX) 568 #elif defined(OS_MACOSX)
569 if (base::mac::IsOSLionOrLater()) 569 if (base::mac::IsOSLionOrLater())
570 supported_scale_factors.push_back(SCALE_FACTOR_200P); 570 supported_scale_factors.push_back(SCALE_FACTOR_200P);
571 #elif defined(OS_CHROMEOS) 571 #elif defined(OS_CHROMEOS)
572 // TODO(oshima): Include 200P only if the device support 200P 572 // TODO(oshima): Include 200P only if the device support 200P
573 supported_scale_factors.push_back(SCALE_FACTOR_200P); 573 supported_scale_factors.push_back(SCALE_FACTOR_200P);
574 #elif defined(OS_LINUX) && defined(ENABLE_HIDPI)
tony 2014/01/10 17:38:27 Nit: Maybe merge this with the OS_CHROMEOS line ab
oshima 2014/01/10 18:46:44 I'd like to keep it separate because I don't know
575 supported_scale_factors.push_back(SCALE_FACTOR_200P);
574 #endif 576 #endif
575 ui::SetSupportedScaleFactors(supported_scale_factors); 577 ui::SetSupportedScaleFactors(supported_scale_factors);
576 #if defined(OS_WIN) 578 #if defined(OS_WIN)
577 // Must be called _after_ supported scale factors are set since it 579 // Must be called _after_ supported scale factors are set since it
578 // uses them. 580 // uses them.
579 ui::win::InitDeviceScaleFactor(); 581 ui::win::InitDeviceScaleFactor();
580 #endif 582 #endif
581 } 583 }
582 584
583 void ResourceBundle::FreeImages() { 585 void ResourceBundle::FreeImages() {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 // static 798 // static
797 bool ResourceBundle::DecodePNG(const unsigned char* buf, 799 bool ResourceBundle::DecodePNG(const unsigned char* buf,
798 size_t size, 800 size_t size,
799 SkBitmap* bitmap, 801 SkBitmap* bitmap,
800 bool* fell_back_to_1x) { 802 bool* fell_back_to_1x) {
801 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size); 803 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size);
802 return gfx::PNGCodec::Decode(buf, size, bitmap); 804 return gfx::PNGCodec::Decode(buf, size, bitmap);
803 } 805 }
804 806
805 } // namespace ui 807 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698