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

Side by Side Diff: content/common/font_loader_mac.h

Issue 7080024: Mac: Part 1 of a fix to get OOP font loading working in the renderer on 10.6.6 . (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review comments Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_COMMON_FONT_LOADER_MAC_H_ 5 #ifndef CONTENT_COMMON_FONT_LOADER_MAC_H_
6 #define CONTENT_COMMON_FONT_LOADER_MAC_H_ 6 #define CONTENT_COMMON_FONT_LOADER_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #include <ApplicationServices/ApplicationServices.h> 9 #include <ApplicationServices/ApplicationServices.h>
10 10
(...skipping 14 matching lines...) Expand all
25 class FontLoader { 25 class FontLoader {
26 public: 26 public:
27 // Load a font specified by |font_to_encode| into a shared memory buffer 27 // Load a font specified by |font_to_encode| into a shared memory buffer
28 // suitable for sending over IPC. 28 // suitable for sending over IPC.
29 // 29 //
30 // On return: 30 // On return:
31 // returns true on success, false on failure. 31 // returns true on success, false on failure.
32 // |font_data| - shared memory buffer containing the raw data for the font 32 // |font_data| - shared memory buffer containing the raw data for the font
33 // file. 33 // file.
34 // |font_data_size| - size of data contained in |font_data|. 34 // |font_data_size| - size of data contained in |font_data|.
35 // |font_id| - unique identifier for the on-disk file we load for the font.
35 static bool LoadFontIntoBuffer(NSFont* font_to_encode, 36 static bool LoadFontIntoBuffer(NSFont* font_to_encode,
36 base::SharedMemory* font_data, 37 base::SharedMemory* font_data,
37 uint32* font_data_size); 38 uint32* font_data_size,
39 uint32* font_id);
38 40
39 // Given a shared memory buffer containing the raw data for a font file, load 41 // Given a shared memory buffer containing the raw data for a font file, load
40 // the font and return a container ref. 42 // the font and return a container ref.
41 // 43 //
42 // |data| - A shared memory handle pointing to the raw data from a font file. 44 // |data| - A shared memory handle pointing to the raw data from a font file.
43 // |data_size| - Size of |data|. 45 // |data_size| - Size of |data|.
44 // 46 //
45 // On return: 47 // On return:
46 // returns true on success, false on failure. 48 // returns true on success, false on failure.
47 // |font_container| - A font container corresponding to the designated font. 49 // |font_container| - A font container corresponding to the designated font.
48 // The caller is responsible for releasing this value via ATSFontDeactivate() 50 // The caller is responsible for releasing this value via ATSFontDeactivate()
49 // when done 51 // when done
50 static bool ATSFontContainerFromBuffer(base::SharedMemoryHandle font_data, 52 static bool ATSFontContainerFromBuffer(base::SharedMemoryHandle font_data,
51 uint32 font_data_size, 53 uint32 font_data_size,
52 ATSFontContainerRef* font_container); 54 ATSFontContainerRef* font_container);
53 }; 55 };
54 56
55 #endif // CONTENT_COMMON_FONT_LOADER_MAC_H_ 57 #endif // CONTENT_COMMON_FONT_LOADER_MAC_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/common/font_loader_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698