summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 04:11:19 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 04:11:19 +0000
commite56c1a512ab3c29e6c44cda660f33ee09ff9bc06 (patch)
tree788ad5e7b9fe2616a9d0ac7f1f2b6f6e579ebbbb /ash
parenta518fc69f6251a4261e5ac2c95deec8efcb475b5 (diff)
downloadchromium_src-e56c1a512ab3c29e6c44cda660f33ee09ff9bc06.zip
chromium_src-e56c1a512ab3c29e6c44cda660f33ee09ff9bc06.tar.gz
chromium_src-e56c1a512ab3c29e6c44cda660f33ee09ff9bc06.tar.bz2
The way that ImageSkia::empty has been implemented, it is equivalent to ImageSkia::isNull. Replaced all instances of ImageSkia::empty with ImageSkia::isNull
Removed ImageSkia::extractSubset, and replaced calls to use ImageSkiaOperations::ExtractSubset instead BUG=None Test=Compiles, try bots pass. Review URL: https://chromiumcodereview.appspot.com/10824359 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/desktop_background/desktop_background_view.cc2
-rw-r--r--ash/launcher/launcher_button.cc2
-rw-r--r--ash/launcher/tabbed_launcher_button.cc4
-rw-r--r--ash/system/power/tray_power.cc7
4 files changed, 7 insertions, 8 deletions
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc
index 5db9135..41345a2 100644
--- a/ash/desktop_background/desktop_background_view.cc
+++ b/ash/desktop_background/desktop_background_view.cc
@@ -153,7 +153,7 @@ views::Widget* CreateDesktopBackground(aura::RootWindow* root_window,
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
DesktopBackgroundView* view = new DesktopBackgroundView();
params.delegate = view;
- if (controller->GetWallpaper().empty())
+ if (controller->GetWallpaper().isNull())
params.transparent = true;
params.parent = root_window->GetChildById(container_id);
desktop_widget->Init(params);
diff --git a/ash/launcher/launcher_button.cc b/ash/launcher/launcher_button.cc
index c0d0685..dfbeb4c 100644
--- a/ash/launcher/launcher_button.cc
+++ b/ash/launcher/launcher_button.cc
@@ -146,7 +146,7 @@ void LauncherButton::SetShadowedImage(const gfx::ImageSkia& image) {
}
void LauncherButton::SetImage(const gfx::ImageSkia& image) {
- if (image.empty()) {
+ if (image.isNull()) {
// TODO: need an empty image.
icon_view_->SetImage(image);
return;
diff --git a/ash/launcher/tabbed_launcher_button.cc b/ash/launcher/tabbed_launcher_button.cc
index d6f4d5b..7add7cf 100644
--- a/ash/launcher/tabbed_launcher_button.cc
+++ b/ash/launcher/tabbed_launcher_button.cc
@@ -58,8 +58,8 @@ void TabbedLauncherButton::IconView::AnimationProgressed(
}
void TabbedLauncherButton::IconView::SetTabImage(const gfx::ImageSkia& image) {
- if (image.empty()) {
- if (!image_.empty()) {
+ if (image.isNull()) {
+ if (!image_.isNull()) {
// Pause for 500ms, then ease out for 200ms.
ui::MultiAnimation::Parts animation_parts;
animation_parts.push_back(ui::MultiAnimation::Part(500, ui::Tween::ZERO));
diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc
index 09ac2d9..48d3f3c 100644
--- a/ash/system/power/tray_power.cc
+++ b/ash/system/power/tray_power.cc
@@ -24,6 +24,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
+#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/size.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/text_button.h"
@@ -126,7 +127,6 @@ TrayPower::~TrayPower() {
gfx::ImageSkia TrayPower::GetBatteryImage(
const PowerSupplyStatus& supply_status,
IconSet icon_set) {
- gfx::ImageSkia image;
gfx::Image all = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
icon_set == ICON_DARK ?
IDR_AURA_UBER_TRAY_POWER_SMALL_DARK : IDR_AURA_UBER_TRAY_POWER_SMALL);
@@ -145,12 +145,11 @@ gfx::ImageSkia TrayPower::GetBatteryImage(
// TODO(mbolohan): Remove the 2px offset when the assets are centered. See
// crbug.com/119832.
- SkIRect region = SkIRect::MakeXYWH(
+ gfx::Rect region(
(supply_status.line_power_on ? kBatteryImageWidth : 0) + 2,
image_index * kBatteryImageHeight,
kBatteryImageWidth - 2, kBatteryImageHeight);
- all.ToImageSkia()->extractSubset(&image, region);
- return image;
+ return gfx::ImageSkiaOperations::ExtractSubset(*all.ToImageSkia(), region);
}
views::View* TrayPower::CreateTrayView(user::LoginStatus status) {