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

Unified Diff: ui/views/painter.cc

Issue 10447053: Converts remainder of ui and chrome/browser/ui/views/frame to use ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
« no previous file with comments | « ui/views/painter.h ('k') | ui/views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/painter.cc
diff --git a/ui/views/painter.cc b/ui/views/painter.cc
index 5df86e71990fd4b7299afa67b19847ead24fe724..e7908886db9df412ec3b109ea61f7ee2b90be25a 100644
--- a/ui/views/painter.cc
+++ b/ui/views/painter.cc
@@ -5,11 +5,11 @@
#include "ui/views/painter.h"
#include "base/logging.h"
-#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image.h"
+#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
@@ -61,7 +61,7 @@ class GradientPainter : public Painter {
class ImagePainter : public Painter {
public:
- ImagePainter(const SkBitmap& image,
+ ImagePainter(const gfx::ImageSkia& image,
const gfx::Insets& insets,
bool paint_center)
: image_(image),
@@ -141,7 +141,7 @@ class ImagePainter : public Painter {
}
private:
- const SkBitmap image_;
+ const gfx::ImageSkia image_;
const gfx::Insets insets_;
bool paint_center_;
@@ -172,7 +172,7 @@ Painter* Painter::CreateVerticalGradient(SkColor c1, SkColor c2) {
}
// static
-Painter* Painter::CreateImagePainter(const SkBitmap& image,
+Painter* Painter::CreateImagePainter(const gfx::ImageSkia& image,
const gfx::Insets& insets,
bool paint_center) {
return new ImagePainter(image, insets, paint_center);
@@ -181,7 +181,7 @@ Painter* Painter::CreateImagePainter(const SkBitmap& image,
HorizontalPainter::HorizontalPainter(const int image_resource_names[]) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
for (int i = 0; i < 3; ++i)
- images_[i] = rb.GetImageNamed(image_resource_names[i]).ToSkBitmap();
+ images_[i] = rb.GetImageNamed(image_resource_names[i]).ToImageSkia();
height_ = images_[LEFT]->height();
DCHECK(images_[LEFT]->height() == images_[RIGHT]->height() &&
images_[LEFT]->height() == images_[CENTER]->height());
« no previous file with comments | « ui/views/painter.h ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698