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

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: rebase with TOT Created 7 years, 8 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 class PlatformContextSkia; 44 class PlatformContextSkia;
44 45
45 // Note that the offsets parameter is optional. If not null it represents a 46 // Note that the offsets parameter is optional. If not null it represents a
46 // per glyph offset (such as returned by ScriptPlace Windows API function). 47 // per glyph offset (such as returned by ScriptPlace Windows API function).
47 void paintSkiaText(GraphicsContext*, 48 void paintSkiaText(GraphicsContext*,
48 const FontPlatformData&, 49 const FontPlatformData&,
49 int numGlyphs, 50 int numGlyphs,
50 const WORD* glyphs, 51 const WORD* glyphs,
51 const int* advances, 52 const int* advances,
52 const GOFFSET* offsets, 53 const GOFFSET* offsets,
53 const SkPoint* origin); 54 const SkPoint& origin,
55 const SkRect& textRect);
54 56
55 // Note that the offsets parameter is optional. If not null it represents a 57 // Note that the offsets parameter is optional. If not null it represents a
56 // per glyph offset (such as returned by ScriptPlace Windows API function). 58 // per glyph offset (such as returned by ScriptPlace Windows API function).
57 // Note: this is less efficient than calling the version with FontPlatformData, 59 // Note: this is less efficient than calling the version with FontPlatformData,
58 // as that caches the SkTypeface object. 60 // as that caches the SkTypeface object.
59 void paintSkiaText(GraphicsContext*, 61 void paintSkiaText(GraphicsContext*,
60 HFONT, 62 HFONT,
61 int numGlyphs, 63 int numGlyphs,
62 const WORD* glyphs, 64 const WORD* glyphs,
63 const int* advances, 65 const int* advances,
64 const GOFFSET* offsets, 66 const GOFFSET* offsets,
65 const SkPoint* origin); 67 const SkPoint& origin,
68 const SkRect& textRect);
66 69
67 } // namespace WebCore 70 } // namespace WebCore
68 71
69 #endif // SkiaFontWin_h 72 #endif // SkiaFontWin_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698