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

Unified Diff: ui/gfx/render_text_linux.cc

Issue 8122013: Allow CanvasSkia to bind to an existing SkCanvas. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 1 more fix Created 9 years, 2 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
Index: ui/gfx/render_text_linux.cc
diff --git a/ui/gfx/render_text_linux.cc b/ui/gfx/render_text_linux.cc
index d744a941a89f9df8bae8de5ca7e7838c8bc9ab67..92af95e6d97bf8d4c61bf51c2d716b003850575d 100644
--- a/ui/gfx/render_text_linux.cc
+++ b/ui/gfx/render_text_linux.cc
@@ -94,7 +94,7 @@ void RenderTextLinux::Draw(Canvas* canvas) {
Rect bounds(display_rect());
// Clip the canvas to the text display area.
- CanvasSkia* canvas_skia = canvas->AsCanvasSkia();
+ SkCanvas* canvas_skia = canvas->GetSkCanvas();
skia::ScopedPlatformPaint scoped_platform_paint(canvas_skia);
cairo_t* cr = scoped_platform_paint.GetPlatformSurface();
@@ -498,7 +498,7 @@ SelectionModel RenderTextLinux::RightSelectionModelByWord(
PangoLayout* RenderTextLinux::EnsureLayout() {
if (layout_ == NULL) {
CanvasSkia canvas(display_rect().width(), display_rect().height(), false);
- skia::ScopedPlatformPaint scoped_platform_paint(&canvas);
+ skia::ScopedPlatformPaint scoped_platform_paint(canvas.sk_canvas());
cairo_t* cr = scoped_platform_paint.GetPlatformSurface();
layout_ = pango_cairo_create_layout(cr);
« ui/gfx/canvas.h ('K') | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698