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

Unified Diff: content/child/browser_font_resource_trusted.cc

Issue 2690583002: Make cc/paint have concrete types (Closed)
Patch Set: PaintRecord as typedef, fixup playback calls Created 3 years, 9 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 | « cc/paint/paint_surface.cc ('k') | content/renderer/gpu/gpu_benchmarking_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/browser_font_resource_trusted.cc
diff --git a/content/child/browser_font_resource_trusted.cc b/content/child/browser_font_resource_trusted.cc
index 9c9480b51a3e835cdefbdde7d1f67701b77b3859..3ceca36ac591692a0acc55e73c598ac5cd794e01 100644
--- a/content/child/browser_font_resource_trusted.cc
+++ b/content/child/browser_font_resource_trusted.cc
@@ -341,11 +341,12 @@ PP_Bool BrowserFontResource_Trusted::DrawTextAt(
return result;
SkSurfaceProps props(0, kUnknown_SkPixelGeometry);
- SkCanvas temp_canvas(bm, props);
+ cc::PaintCanvas temp_canvas(bm, props);
DrawTextToCanvas(&temp_canvas, *text, position, color, clip);
} else {
- DrawTextToCanvas(canvas, *text, position, color, clip);
+ cc::PaintCanvas temp_canvas(canvas);
+ DrawTextToCanvas(&temp_canvas, *text, position, color, clip);
}
if (needs_unmapping)
@@ -414,7 +415,7 @@ int32_t BrowserFontResource_Trusted::PixelOffsetForCharacter(
}
void BrowserFontResource_Trusted::DrawTextToCanvas(
- SkCanvas* destination,
+ cc::PaintCanvas* destination,
const PP_BrowserFont_Trusted_TextRun& text,
const PP_Point* position,
uint32_t color,
@@ -424,7 +425,7 @@ void BrowserFontResource_Trusted::DrawTextToCanvas(
static_cast<float>(position->y));
WebRect web_clip;
if (!clip) {
- // Use entire canvas. SkCanvas doesn't have a size on it, so we just use
+ // Use entire canvas. PaintCanvas doesn't have a size on it, so we just use
// the current clip bounds.
SkRect skclip = destination->getLocalClipBounds();
web_clip = WebRect(skclip.fLeft, skclip.fTop, skclip.fRight - skclip.fLeft,
« no previous file with comments | « cc/paint/paint_surface.cc ('k') | content/renderer/gpu/gpu_benchmarking_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698