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

Unified Diff: ui/gfx/harfbuzz_font_skia.cc

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/color_utils_unittest.cc ('k') | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/harfbuzz_font_skia.cc
diff --git a/ui/gfx/harfbuzz_font_skia.cc b/ui/gfx/harfbuzz_font_skia.cc
index 889fa2d22954f8e33f87a53f98cdb4d942536bab..602b02a143ccbdfcf64a43b8eb388b12077e5597 100644
--- a/ui/gfx/harfbuzz_font_skia.cc
+++ b/ui/gfx/harfbuzz_font_skia.cc
@@ -13,7 +13,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "third_party/skia/include/core/SkPaint.h"
+#include "cc/paint/paint_flags.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "ui/gfx/render_text.h"
#include "ui/gfx/skia_util.h"
@@ -34,7 +34,7 @@ typedef std::pair<HarfBuzzFace, GlyphCache> FaceCache;
struct FontData {
FontData(GlyphCache* glyph_cache) : glyph_cache_(glyph_cache) {}
- SkPaint paint_;
+ cc::PaintFlags paint_;
GlyphCache* glyph_cache_;
};
@@ -53,12 +53,12 @@ void DeleteArrayByType(void* data) {
// Outputs the |width| and |extents| of the glyph with index |codepoint| in
// |paint|'s font.
-void GetGlyphWidthAndExtents(SkPaint* paint,
+void GetGlyphWidthAndExtents(cc::PaintFlags* paint,
hb_codepoint_t codepoint,
hb_position_t* width,
hb_glyph_extents_t* extents) {
DCHECK_LE(codepoint, std::numeric_limits<uint16_t>::max());
- paint->setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ paint->setTextEncoding(cc::PaintFlags::kGlyphID_TextEncoding);
SkScalar sk_width;
SkRect sk_bounds;
@@ -90,8 +90,8 @@ hb_bool_t GetGlyph(hb_font_t* font,
bool exists = cache->count(unicode) != 0;
if (!exists) {
- SkPaint* paint = &font_data->paint_;
- paint->setTextEncoding(SkPaint::kUTF32_TextEncoding);
+ cc::PaintFlags* paint = &font_data->paint_;
+ paint->setTextEncoding(cc::PaintFlags::kUTF32_TextEncoding);
paint->textToGlyphs(&unicode, sizeof(hb_codepoint_t), &(*cache)[unicode]);
}
*glyph = (*cache)[unicode];
« no previous file with comments | « ui/gfx/color_utils_unittest.cc ('k') | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698