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 "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h" | 5 #include "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
648 | 648 |
649 SkBitmap TabRendererGtk::PaintBitmap() { | 649 SkBitmap TabRendererGtk::PaintBitmap() { |
650 gfx::CanvasSkia canvas(width(), height(), false); | 650 gfx::CanvasSkia canvas(width(), height(), false); |
651 Paint(&canvas); | 651 Paint(&canvas); |
652 return canvas.ExtractBitmap(); | 652 return canvas.ExtractBitmap(); |
653 } | 653 } |
654 | 654 |
655 cairo_surface_t* TabRendererGtk::PaintToSurface() { | 655 cairo_surface_t* TabRendererGtk::PaintToSurface() { |
656 gfx::CanvasSkia canvas(width(), height(), false); | 656 gfx::CanvasSkia canvas(width(), height(), false); |
657 Paint(&canvas); | 657 Paint(&canvas); |
658 return cairo_surface_reference(cairo_get_target(canvas.beginPlatformPaint())); | 658 return cairo_surface_reference(cairo_get_target( |
659 skia::BeginPlatformPaint(&canvas))); | |
Jeff Timanus
2011/05/24 16:50:28
This code does not have a end platform paint pair.
| |
659 } | 660 } |
660 | 661 |
661 void TabRendererGtk::SchedulePaint() { | 662 void TabRendererGtk::SchedulePaint() { |
662 gtk_widget_queue_draw(tab_.get()); | 663 gtk_widget_queue_draw(tab_.get()); |
663 } | 664 } |
664 | 665 |
665 gfx::Rect TabRendererGtk::GetLocalBounds() { | 666 gfx::Rect TabRendererGtk::GetLocalBounds() { |
666 return gfx::Rect(0, 0, bounds_.width(), bounds_.height()); | 667 return gfx::Rect(0, 0, bounds_.width(), bounds_.height()); |
667 } | 668 } |
668 | 669 |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1087 | 1088 |
1088 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 1089 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
1089 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); | 1090 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); |
1090 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize); | 1091 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize); |
1091 title_font_height_ = title_font_->GetHeight(); | 1092 title_font_height_ = title_font_->GetHeight(); |
1092 | 1093 |
1093 crashed_favicon = rb.GetBitmapNamed(IDR_SAD_FAVICON); | 1094 crashed_favicon = rb.GetBitmapNamed(IDR_SAD_FAVICON); |
1094 | 1095 |
1095 initialized_ = true; | 1096 initialized_ = true; |
1096 } | 1097 } |
OLD | NEW |