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

Unified Diff: content/child/browser_font_resource_trusted.cc

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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 | « content/child/browser_font_resource_trusted.h ('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 30bae9f179ba5e0c2e22ddd1230f45541312cd0c..14bbf4658b1fcd0659b0dca6a8dbdd95e16ad320 100644
--- a/content/child/browser_font_resource_trusted.cc
+++ b/content/child/browser_font_resource_trusted.cc
@@ -315,7 +315,7 @@ PP_Bool BrowserFontResource_Trusted::DrawTextAt(
PPB_ImageData_API* image = static_cast<PPB_ImageData_API*>(
enter.object());
- SkCanvas* canvas = image->GetPlatformCanvas();
+ CdlCanvas* canvas = image->GetPlatformCanvas();
bool needs_unmapping = false;
if (!canvas) {
needs_unmapping = true;
@@ -332,7 +332,7 @@ PP_Bool BrowserFontResource_Trusted::DrawTextAt(
// we have to handle it here.
SkImageInfo info;
size_t row_bytes;
- void* pixels = canvas->accessTopLayerPixels(&info, &row_bytes);
+ void* pixels = GetSkCanvas(canvas)->accessTopLayerPixels(&info, &row_bytes);
if (!pixels)
return result;
@@ -341,7 +341,7 @@ PP_Bool BrowserFontResource_Trusted::DrawTextAt(
return result;
SkSurfaceProps props(0, kUnknown_SkPixelGeometry);
- SkCanvas temp_canvas(bm, props);
+ CdlCanvas temp_canvas(bm, props);
DrawTextToCanvas(&temp_canvas, *text, position, color, clip);
} else {
@@ -414,7 +414,7 @@ int32_t BrowserFontResource_Trusted::PixelOffsetForCharacter(
}
void BrowserFontResource_Trusted::DrawTextToCanvas(
- SkCanvas* destination,
+ CdlCanvas* destination,
const PP_BrowserFont_Trusted_TextRun& text,
const PP_Point* position,
uint32_t color,
« no previous file with comments | « content/child/browser_font_resource_trusted.h ('k') | content/renderer/gpu/gpu_benchmarking_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698