OLD | NEW |
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 Loading... |
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 |
OLD | NEW |