From bb664cfb48112bae9d753e567298aacb4436032c Mon Sep 17 00:00:00 2001 From: "jbroman@chromium.org" Date: Wed, 5 Mar 2014 06:13:46 +0000 Subject: Fix some minor issues in x11_whole_screen_move_loop.cc. * Fix an unsigned-to-signed comparison. * Remove strange assignment of a boolean to a char. * Fix indentation. BUG= Review URL: https://codereview.chromium.org/186893002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254956 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ui/views') diff --git a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc index 9fd02a3..3f48b89 100644 --- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc +++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc @@ -30,7 +30,7 @@ namespace { // The minimum alpha before we declare a pixel transparent when searching in // our source image. -const int kMinAlpha = 32; +const uint32 kMinAlpha = 32; class ScopedCapturer { public: @@ -119,7 +119,7 @@ bool X11WholeScreenMoveLoop::RunMoveLoop(aura::Window* source, grab_input_window_ = CreateDragInputWindow(display); if (!drag_image_.isNull() && CheckIfIconValid()) - CreateDragImageWindow(); + CreateDragImageWindow(); base::MessagePumpX11::Current()->AddDispatcherForWindow( this, grab_input_window_); // Releasing ScopedCapturer ensures that any other instance of @@ -297,8 +297,7 @@ bool X11WholeScreenMoveLoop::CheckIfIconValid() { uint32* in_row = in_bitmap->getAddr32(0, y); for (int x = 0; x < in_bitmap->width(); ++x) { - char value = SkColorGetA(in_row[x]) > kMinAlpha; - if (value) + if (SkColorGetA(in_row[x]) > kMinAlpha) return true; } } -- cgit v1.1