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

Side by Side Diff: Source/core/platform/graphics/skia/SkiaFontWin.h

Issue 14160005: Track the region where text is painted. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed build on win and mac Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, Google Inc. All rights reserved. 2 * Copyright (c) 2008, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef SkiaFontWin_h 31 #ifndef SkiaFontWin_h
32 #define SkiaFontWin_h 32 #define SkiaFontWin_h
33 33
34 #include <windows.h> 34 #include <windows.h>
35 #include <usp10.h> 35 #include <usp10.h>
36 36
37 struct SkPoint; 37 struct SkPoint;
38 struct SkRect;
38 39
39 namespace WebCore { 40 namespace WebCore {
40 41
41 class FontPlatformData; 42 class FontPlatformData;
42 class GraphicsContext; 43 class GraphicsContext;
43 44
44 // Note that the offsets parameter is optional. If not null it represents a 45 // Note that the offsets parameter is optional. If not null it represents a
45 // per glyph offset (such as returned by ScriptPlace Windows API function). 46 // per glyph offset (such as returned by ScriptPlace Windows API function).
46 void paintSkiaText(GraphicsContext*, 47 void paintSkiaText(GraphicsContext*,
47 const FontPlatformData&, 48 const FontPlatformData&,
48 int numGlyphs, 49 int numGlyphs,
49 const WORD* glyphs, 50 const WORD* glyphs,
50 const int* advances, 51 const int* advances,
51 const GOFFSET* offsets, 52 const GOFFSET* offsets,
52 const SkPoint* origin); 53 const SkPoint& origin,
54 const SkRect& textRect);
53 55
54 // Note that the offsets parameter is optional. If not null it represents a 56 // Note that the offsets parameter is optional. If not null it represents a
55 // per glyph offset (such as returned by ScriptPlace Windows API function). 57 // per glyph offset (such as returned by ScriptPlace Windows API function).
56 // Note: this is less efficient than calling the version with FontPlatformData, 58 // Note: this is less efficient than calling the version with FontPlatformData,
57 // as that caches the SkTypeface object. 59 // as that caches the SkTypeface object.
58 void paintSkiaText(GraphicsContext*, 60 void paintSkiaText(GraphicsContext*,
59 HFONT, 61 HFONT,
60 int numGlyphs, 62 int numGlyphs,
61 const WORD* glyphs, 63 const WORD* glyphs,
62 const int* advances, 64 const int* advances,
63 const GOFFSET* offsets, 65 const GOFFSET* offsets,
64 const SkPoint* origin); 66 const SkPoint& origin,
67 const SkRect& textRect);
65 68
66 } // namespace WebCore 69 } // namespace WebCore
67 70
68 #endif // SkiaFontWin_h 71 #endif // SkiaFontWin_h
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/mac/FontMac.cpp ('k') | Source/core/platform/graphics/skia/SkiaFontWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698