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

Side by Side Diff: ui/gfx/platform_font_win.h

Issue 1121633002: win: Work on reducing number of style plugin warnings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 7 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
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 #ifndef UI_GFX_PLATFORM_FONT_WIN_H_ 5 #ifndef UI_GFX_PLATFORM_FONT_WIN_H_
6 #define UI_GFX_PLATFORM_FONT_WIN_H_ 6 #define UI_GFX_PLATFORM_FONT_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 TEXTMETRIC* text_metrics); 78 TEXTMETRIC* text_metrics);
79 79
80 // Returns the size of the font based on the font information passed in. 80 // Returns the size of the font based on the font information passed in.
81 static int GetFontSize(const LOGFONT& font_info); 81 static int GetFontSize(const LOGFONT& font_info);
82 82
83 private: 83 private:
84 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_UniscribeFallback); 84 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_UniscribeFallback);
85 FRIEND_TEST_ALL_PREFIXES(PlatformFontWinTest, Metrics_SkiaVersusGDI); 85 FRIEND_TEST_ALL_PREFIXES(PlatformFontWinTest, Metrics_SkiaVersusGDI);
86 FRIEND_TEST_ALL_PREFIXES(PlatformFontWinTest, DirectWriteFontSubstitution); 86 FRIEND_TEST_ALL_PREFIXES(PlatformFontWinTest, DirectWriteFontSubstitution);
87 87
88 ~PlatformFontWin() override {} 88 ~PlatformFontWin() override;
89 89
90 // Chrome text drawing bottoms out in the Windows GDI functions that take an 90 // Chrome text drawing bottoms out in the Windows GDI functions that take an
91 // HFONT (an opaque handle into Windows). To avoid lots of GDI object 91 // HFONT (an opaque handle into Windows). To avoid lots of GDI object
92 // allocation and destruction, Font indirectly refers to the HFONT by way of 92 // allocation and destruction, Font indirectly refers to the HFONT by way of
93 // an HFontRef. That is, every Font has an HFontRef, which has an HFONT. 93 // an HFontRef. That is, every Font has an HFontRef, which has an HFONT.
94 // 94 //
95 // HFontRef is reference counted. Upon deletion, it deletes the HFONT. 95 // HFontRef is reference counted. Upon deletion, it deletes the HFONT.
96 // By making HFontRef maintain the reference to the HFONT, multiple 96 // By making HFontRef maintain the reference to the HFONT, multiple
97 // HFontRefs can share the same HFONT, and Font can provide value semantics. 97 // HFontRefs can share the same HFONT, and Font can provide value semantics.
98 class GFX_EXPORT HFontRef : public base::RefCounted<HFontRef> { 98 class GFX_EXPORT HFontRef : public base::RefCounted<HFontRef> {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 // Pointer to the global IDWriteFactory interface. 200 // Pointer to the global IDWriteFactory interface.
201 static IDWriteFactory* direct_write_factory_; 201 static IDWriteFactory* direct_write_factory_;
202 202
203 DISALLOW_COPY_AND_ASSIGN(PlatformFontWin); 203 DISALLOW_COPY_AND_ASSIGN(PlatformFontWin);
204 }; 204 };
205 205
206 } // namespace gfx 206 } // namespace gfx
207 207
208 #endif // UI_GFX_PLATFORM_FONT_WIN_H_ 208 #endif // UI_GFX_PLATFORM_FONT_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698