Index: ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc |
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 fa9b75f4efeb59889512169274bc7b9fbe6fb76d..1db4a2226ef5bbe561958d839092029211a053d2 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 |
@@ -363,17 +363,9 @@ void X11WholeScreenMoveLoop::CreateDragImageWindow() { |
} |
bool X11WholeScreenMoveLoop::CheckIfIconValid() { |
- // TODO(erg): I've tried at least five different strategies for trying to |
- // build a mask based off the alpha channel. While all of them have worked, |
- // none of them have been performant and introduced multiple second |
- // delays. (I spent a day getting a rectangle segmentation algorithm polished |
- // here...and then found that even through I had the rectangle extraction |
- // down to mere milliseconds, SkRegion still fell over on the number of |
- // rectangles.) |
- // |
- // Creating a mask here near instantaneously should be possible, as GTK does |
- // it, but I've blown days on this and I'm punting now. |
- |
+ // Because we need a GL context per window, we do a quick check so that we |
+ // don't make another context if the window would just be displaying a mostly |
+ // transparent image. |
const SkBitmap* in_bitmap = drag_image_.bitmap(); |
SkAutoLockPixels in_lock(*in_bitmap); |
for (int y = 0; y < in_bitmap->height(); ++y) { |