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

Unified Diff: ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc

Issue 266643003: linux_aura: Add a flag for experimenting with ARGB windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USE_X11 Created 6 years, 8 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/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698