OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |