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

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

Issue 672583003: remove ui/base/win/dpi_setup.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dpi-cleanup-2
Patch Set: rebase-3 Created 6 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/base/BUILD.gn ('k') | ui/base/ui_base.gyp » ('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 <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/big_endian.h" 10 #include "base/big_endian.h"
(...skipping 28 matching lines...) Expand all
39 #if defined(OS_ANDROID) 39 #if defined(OS_ANDROID)
40 #include "ui/base/resource/resource_bundle_android.h" 40 #include "ui/base/resource/resource_bundle_android.h"
41 #endif 41 #endif
42 42
43 #if defined(OS_CHROMEOS) 43 #if defined(OS_CHROMEOS)
44 #include "ui/base/l10n/l10n_util.h" 44 #include "ui/base/l10n/l10n_util.h"
45 #include "ui/gfx/platform_font_pango.h" 45 #include "ui/gfx/platform_font_pango.h"
46 #endif 46 #endif
47 47
48 #if defined(OS_WIN) 48 #if defined(OS_WIN)
49 #include "ui/base/win/dpi_setup.h"
50 #include "ui/gfx/win/dpi.h" 49 #include "ui/gfx/win/dpi.h"
51 #endif 50 #endif
52 51
53 #if defined(OS_MACOSX) && !defined(OS_IOS) 52 #if defined(OS_MACOSX) && !defined(OS_IOS)
54 #include "base/mac/mac_util.h" 53 #include "base/mac/mac_util.h"
55 #endif 54 #endif
56 55
57 namespace ui { 56 namespace ui {
58 57
59 namespace { 58 namespace {
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 if (default_to_100P) 641 if (default_to_100P)
643 supported_scale_factors.push_back(SCALE_FACTOR_100P); 642 supported_scale_factors.push_back(SCALE_FACTOR_100P);
644 #endif 643 #endif
645 ui::SetSupportedScaleFactors(supported_scale_factors); 644 ui::SetSupportedScaleFactors(supported_scale_factors);
646 #if defined(OS_WIN) 645 #if defined(OS_WIN)
647 // Must be called _after_ supported scale factors are set since it 646 // Must be called _after_ supported scale factors are set since it
648 // uses them. 647 // uses them.
649 // Don't initialize the device scale factor if it has already been 648 // Don't initialize the device scale factor if it has already been
650 // initialized. 649 // initialized.
651 if (!gfx::win::IsDeviceScaleFactorSet()) 650 if (!gfx::win::IsDeviceScaleFactorSet())
652 ui::win::InitDeviceScaleFactor(); 651 gfx::InitDeviceScaleFactor(gfx::GetDPIScale());
653 #endif 652 #endif
654 } 653 }
655 654
656 void ResourceBundle::FreeImages() { 655 void ResourceBundle::FreeImages() {
657 images_.clear(); 656 images_.clear();
658 } 657 }
659 658
660 void ResourceBundle::AddDataPackFromPathInternal(const base::FilePath& path, 659 void ResourceBundle::AddDataPackFromPathInternal(const base::FilePath& path,
661 ScaleFactor scale_factor, 660 ScaleFactor scale_factor,
662 bool optional) { 661 bool optional) {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // static 858 // static
860 bool ResourceBundle::DecodePNG(const unsigned char* buf, 859 bool ResourceBundle::DecodePNG(const unsigned char* buf,
861 size_t size, 860 size_t size,
862 SkBitmap* bitmap, 861 SkBitmap* bitmap,
863 bool* fell_back_to_1x) { 862 bool* fell_back_to_1x) {
864 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size); 863 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size);
865 return gfx::PNGCodec::Decode(buf, size, bitmap); 864 return gfx::PNGCodec::Decode(buf, size, bitmap);
866 } 865 }
867 866
868 } // namespace ui 867 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/ui_base.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698