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

Side by Side Diff: ui/gfx/canvas_skia_linux.cc

Issue 7265011: RenderText API Outline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add some placeholder functionality on Windows. Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/canvas_skia.h" 5 #include "ui/gfx/canvas_skia.h"
6 6
7 #include <cairo/cairo.h> 7 #include <cairo/cairo.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #include <pango/pango.h> 9 #include <pango/pango.h>
10 #include <pango/pangocairo.h> 10 #include <pango/pangocairo.h>
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 int x, int y, int w, int h, 418 int x, int y, int w, int h,
419 int flags) { 419 int flags) {
420 if (!IntersectsClipRectInt(x, y, w, h)) 420 if (!IntersectsClipRectInt(x, y, w, h))
421 return; 421 return;
422 422
423 gfx::Rect bounds(x, y, w, h); 423 gfx::Rect bounds(x, y, w, h);
424 DrawStringContext context(this, text, font, bounds, bounds, flags); 424 DrawStringContext context(this, text, font, bounds, bounds, flags);
425 context.Draw(color); 425 context.Draw(color);
426 } 426 }
427 427
428 void CanvasSkia::DrawStringInt(const RenderText& render_text) {
429 NOTIMPLEMENTED();
430 }
431
428 void CanvasSkia::DrawGdkPixbuf(GdkPixbuf* pixbuf, int x, int y) { 432 void CanvasSkia::DrawGdkPixbuf(GdkPixbuf* pixbuf, int x, int y) {
429 if (!pixbuf) { 433 if (!pixbuf) {
430 NOTREACHED(); 434 NOTREACHED();
431 return; 435 return;
432 } 436 }
433 437
434 skia::ScopedPlatformPaint scoped_platform_paint(this); 438 skia::ScopedPlatformPaint scoped_platform_paint(this);
435 cairo_t* cr = scoped_platform_paint.GetPlatformSurface(); 439 cairo_t* cr = scoped_platform_paint.GetPlatformSurface();
436 gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y); 440 gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y);
437 cairo_paint(cr); 441 cairo_paint(cr);
438 } 442 }
439 443
440 ui::TextureID CanvasSkia::GetTextureID() { 444 ui::TextureID CanvasSkia::GetTextureID() {
441 // TODO(wjmaclean) 445 // TODO(wjmaclean)
442 return 0; 446 return 0;
443 } 447 }
444 448
445 } // namespace gfx 449 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/canvas_skia_mac.mm » ('j') | ui/gfx/render_text.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698