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

Side by Side Diff: content/child/dwrite_font_proxy/dwrite_font_proxy_win.h

Issue 1920843004: Delete the font loading experiment code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | content/child/dwrite_font_proxy/dwrite_font_proxy_win.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_WIN_H_ 5 #ifndef CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_WIN_H_
6 #define CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_WIN_H_ 6 #define CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_WIN_H_
7 7
8 #include <dwrite.h> 8 #include <dwrite.h>
9 #include <wrl.h> 9 #include <wrl.h>
10 10
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 std::vector<Microsoft::WRL::ComPtr<IDWriteFontFileStream>> file_streams_; 173 std::vector<Microsoft::WRL::ComPtr<IDWriteFontFileStream>> file_streams_;
174 UINT32 next_file_ = 0; 174 UINT32 next_file_ = 0;
175 UINT32 current_file_ = UINT_MAX; 175 UINT32 current_file_ = UINT_MAX;
176 176
177 DISALLOW_ASSIGN(FontFileEnumerator); 177 DISALLOW_ASSIGN(FontFileEnumerator);
178 }; 178 };
179 179
180 // Implements the DirectWrite font file stream interface that maps the file to 180 // Implements the DirectWrite font file stream interface that maps the file to
181 // be loaded as a memory mapped file, and subsequently returns pointers into 181 // be loaded as a memory mapped file, and subsequently returns pointers into
182 // the mapped memory block. 182 // the mapped memory block.
183 // TODO(kulshin): confirm that using custom streams is actually an improvement
184 class CONTENT_EXPORT FontFileStream 183 class CONTENT_EXPORT FontFileStream
185 : public Microsoft::WRL::RuntimeClass< 184 : public Microsoft::WRL::RuntimeClass<
186 Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, 185 Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
187 IDWriteFontFileStream> { 186 IDWriteFontFileStream> {
188 public: 187 public:
189 FontFileStream(); 188 FontFileStream();
190 ~FontFileStream() override; 189 ~FontFileStream() override;
191 190
192 // IDWriteFontFileStream: 191 // IDWriteFontFileStream:
193 HRESULT STDMETHODCALLTYPE GetFileSize(UINT64* file_size) override; 192 HRESULT STDMETHODCALLTYPE GetFileSize(UINT64* file_size) override;
194 HRESULT STDMETHODCALLTYPE GetLastWriteTime(UINT64* last_write_time) override; 193 HRESULT STDMETHODCALLTYPE GetLastWriteTime(UINT64* last_write_time) override;
195 HRESULT STDMETHODCALLTYPE ReadFileFragment(const void** fragment_start, 194 HRESULT STDMETHODCALLTYPE ReadFileFragment(const void** fragment_start,
196 UINT64 file_offset, 195 UINT64 file_offset,
197 UINT64 fragment_size, 196 UINT64 fragment_size,
198 void** fragment_context) override; 197 void** fragment_context) override;
199 void STDMETHODCALLTYPE ReleaseFileFragment(void* fragment_context) override {} 198 void STDMETHODCALLTYPE ReleaseFileFragment(void* fragment_context) override {}
200 199
201 HRESULT STDMETHODCALLTYPE 200 HRESULT STDMETHODCALLTYPE
202 RuntimeClassInitialize(const base::string16& file_name); 201 RuntimeClassInitialize(const base::string16& file_name);
203 202
204 private: 203 private:
205 base::MemoryMappedFile data_; 204 base::MemoryMappedFile data_;
206 205
207 DISALLOW_ASSIGN(FontFileStream); 206 DISALLOW_ASSIGN(FontFileStream);
208 }; 207 };
209 208
210 } // namespace content 209 } // namespace content
211 #endif // CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_WIN_H_ 210 #endif // CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | content/child/dwrite_font_proxy/dwrite_font_proxy_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698