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

Side by Side Diff: sky/engine/platform/text/TextRun.h

Issue 859203002: Merge Blink code to cache SkTextBlob (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: hashmap Created 5 years, 11 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 | « sky/engine/platform/graphics/GraphicsContext.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2007, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2006, 2007, 2011 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 14 matching lines...) Expand all
25 #define SKY_ENGINE_PLATFORM_TEXT_TEXTRUN_H_ 25 #define SKY_ENGINE_PLATFORM_TEXT_TEXTRUN_H_
26 26
27 #include "sky/engine/platform/PlatformExport.h" 27 #include "sky/engine/platform/PlatformExport.h"
28 #include "sky/engine/platform/fonts/Glyph.h" 28 #include "sky/engine/platform/fonts/Glyph.h"
29 #include "sky/engine/platform/geometry/FloatRect.h" 29 #include "sky/engine/platform/geometry/FloatRect.h"
30 #include "sky/engine/platform/text/TextDirection.h" 30 #include "sky/engine/platform/text/TextDirection.h"
31 #include "sky/engine/platform/text/TextPath.h" 31 #include "sky/engine/platform/text/TextPath.h"
32 #include "sky/engine/wtf/RefCounted.h" 32 #include "sky/engine/wtf/RefCounted.h"
33 #include "sky/engine/wtf/text/WTFString.h" 33 #include "sky/engine/wtf/text/WTFString.h"
34 34
35 class SkTextBlob;
36
35 namespace blink { 37 namespace blink {
36 38
37 class FloatPoint; 39 class FloatPoint;
38 class Font; 40 class Font;
39 class GraphicsContext; 41 class GraphicsContext;
40 class GlyphBuffer; 42 class GlyphBuffer;
41 class SimpleFontData; 43 class SimpleFontData;
42 struct GlyphData; 44 struct GlyphData;
43 struct WidthIterator; 45 struct WidthIterator;
44 46
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 m_allowTabs = allow; 240 m_allowTabs = allow;
239 m_tabSize = size; 241 m_tabSize = size;
240 } 242 }
241 243
242 // Container for parameters needed to paint TextRun. 244 // Container for parameters needed to paint TextRun.
243 struct TextRunPaintInfo { 245 struct TextRunPaintInfo {
244 explicit TextRunPaintInfo(const TextRun& r) 246 explicit TextRunPaintInfo(const TextRun& r)
245 : run(r) 247 : run(r)
246 , from(0) 248 , from(0)
247 , to(r.length()) 249 , to(r.length())
250 , cachedTextBlob(nullptr)
248 { 251 {
249 } 252 }
250 253
251 const TextRun& run; 254 const TextRun& run;
252 int from; 255 int from;
253 int to; 256 int to;
254 FloatRect bounds; 257 FloatRect bounds;
258 RefPtr<const SkTextBlob>* cachedTextBlob;
255 }; 259 };
256 260
257 } 261 }
258 #endif // SKY_ENGINE_PLATFORM_TEXT_TEXTRUN_H_ 262 #endif // SKY_ENGINE_PLATFORM_TEXT_TEXTRUN_H_
OLDNEW
« no previous file with comments | « sky/engine/platform/graphics/GraphicsContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698