Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/public/renderer/render_font_warmup_win.h" | 5 #include "content/public/common/render_font_warmup_win.h" |
| 6 | 6 |
| 7 #include <dwrite.h> | 7 #include <dwrite.h> |
| 8 | 8 |
| 9 #include "base/debug/alias.h" | 9 #include "base/debug/alias.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/win/iat_patch_function.h" | 11 #include "base/win/iat_patch_function.h" |
| 12 #include "base/win/windows_version.h" | 12 #include "base/win/windows_version.h" |
| 13 #include "content/public/common/dwrite_font_platform_win.h" | 13 #include "content/public/common/dwrite_font_platform_win.h" |
| 14 #include "third_party/WebKit/public/web/win/WebFontRendering.h" | 14 #include "third_party/WebKit/public/web/win/WebFontRendering.h" |
| 15 #include "third_party/skia/include/core/SkPaint.h" | 15 #include "third_party/skia/include/core/SkPaint.h" |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 39 const wchar_t* database_name, | 39 const wchar_t* database_name, |
| 40 DWORD access_mask) { | 40 DWORD access_mask) { |
| 41 ::SetLastError(0); | 41 ::SetLastError(0); |
| 42 return reinterpret_cast<SC_HANDLE>(0xdeadbeef); | 42 return reinterpret_cast<SC_HANDLE>(0xdeadbeef); |
| 43 } | 43 } |
| 44 | 44 |
| 45 SC_HANDLE WINAPI OpenServiceWPatch(SC_HANDLE sc_manager, | 45 SC_HANDLE WINAPI OpenServiceWPatch(SC_HANDLE sc_manager, |
| 46 const wchar_t* service_name, | 46 const wchar_t* service_name, |
| 47 DWORD access_mask) { | 47 DWORD access_mask) { |
| 48 ::SetLastError(0); | 48 ::SetLastError(0); |
| 49 return reinterpret_cast<SC_HANDLE>(0xdeadbabe); | 49 return reinterpret_cast<SC_HANDLE>(0xdeadbabe); |
|
palmer
2015/09/11 22:53:09
Since the code re-uses these constants in a few pl
forshaw
2015/09/11 23:05:06
What's the policy when it's just a move of a file?
| |
| 50 } | 50 } |
| 51 | 51 |
| 52 BOOL WINAPI CloseServiceHandlePatch(SC_HANDLE service_handle) { | 52 BOOL WINAPI CloseServiceHandlePatch(SC_HANDLE service_handle) { |
| 53 if (service_handle != reinterpret_cast<SC_HANDLE>(0xdeadbabe) && | 53 if (service_handle != reinterpret_cast<SC_HANDLE>(0xdeadbabe) && |
| 54 service_handle != reinterpret_cast<SC_HANDLE>(0xdeadbeef)) | 54 service_handle != reinterpret_cast<SC_HANDLE>(0xdeadbeef)) |
| 55 CHECK(false); | 55 CHECK(false); |
| 56 ::SetLastError(0); | 56 ::SetLastError(0); |
| 57 return TRUE; | 57 return TRUE; |
| 58 } | 58 } |
| 59 | 59 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 | 195 |
| 196 PatchDWriteFactory(factory); | 196 PatchDWriteFactory(factory); |
| 197 | 197 |
| 198 blink::WebFontRendering::setDirectWriteFactory(factory); | 198 blink::WebFontRendering::setDirectWriteFactory(factory); |
| 199 g_warmup_fontmgr = SkFontMgr_New_DirectWrite(factory); | 199 g_warmup_fontmgr = SkFontMgr_New_DirectWrite(factory); |
| 200 } | 200 } |
| 201 return g_warmup_fontmgr; | 201 return g_warmup_fontmgr; |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace content | 204 } // namespace content |
| OLD | NEW |