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

Side by Side Diff: components/exo/shell_surface_unittest.cc

Issue 2502373003: stop using SkXfermode -- use SkBlendMode instead (Closed)
Patch Set: rebase Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/aura/wm_window_aura.h" 5 #include "ash/aura/wm_window_aura.h"
6 #include "ash/common/accessibility_delegate.h" 6 #include "ash/common/accessibility_delegate.h"
7 #include "ash/common/wm/window_state.h" 7 #include "ash/common/wm/window_state.h"
8 #include "ash/common/wm/wm_event.h" 8 #include "ash/common/wm/wm_event.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/public/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); 420 new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
421 child->Attach(child_buffer.get()); 421 child->Attach(child_buffer.get());
422 std::unique_ptr<SubSurface> sub_surface( 422 std::unique_ptr<SubSurface> sub_surface(
423 display->CreateSubSurface(child.get(), surface.get())); 423 display->CreateSubSurface(child.get(), surface.get()));
424 surface->SetSubSurfacePosition(child.get(), gfx::Point(10, 10)); 424 surface->SetSubSurfacePosition(child.get(), gfx::Point(10, 10));
425 child->Commit(); 425 child->Commit();
426 surface->Commit(); 426 surface->Commit();
427 EXPECT_FALSE(ash::WmShell::Get()->IsSystemModalWindowOpen()); 427 EXPECT_FALSE(ash::WmShell::Get()->IsSystemModalWindowOpen());
428 428
429 // Making the surface opaque shouldn't make it modal either. 429 // Making the surface opaque shouldn't make it modal either.
430 child->SetBlendMode(SkXfermode::kSrc_Mode); 430 child->SetBlendMode(SkBlendMode::kSrc);
431 child->Commit(); 431 child->Commit();
432 surface->Commit(); 432 surface->Commit();
433 EXPECT_FALSE(ash::WmShell::Get()->IsSystemModalWindowOpen()); 433 EXPECT_FALSE(ash::WmShell::Get()->IsSystemModalWindowOpen());
434 434
435 // Setting input regions won't make it modal either. 435 // Setting input regions won't make it modal either.
436 surface->SetInputRegion( 436 surface->SetInputRegion(
437 SkRegion(gfx::RectToSkIRect(gfx::Rect(10, 10, 100, 100)))); 437 SkRegion(gfx::RectToSkIRect(gfx::Rect(10, 10, 100, 100))));
438 surface->Commit(); 438 surface->Commit();
439 EXPECT_FALSE(ash::WmShell::Get()->IsSystemModalWindowOpen()); 439 EXPECT_FALSE(ash::WmShell::Get()->IsSystemModalWindowOpen());
440 440
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 shell_surface.OnAccessibilityModeChanged(); 807 shell_surface.OnAccessibilityModeChanged();
808 shell_surface2.OnAccessibilityModeChanged(); 808 shell_surface2.OnAccessibilityModeChanged();
809 809
810 EXPECT_TRUE(shell_surface.shadow_underlay()->IsVisible()); 810 EXPECT_TRUE(shell_surface.shadow_underlay()->IsVisible());
811 EXPECT_EQ(shadow_bounds, shell_surface.shadow_underlay()->bounds()); 811 EXPECT_EQ(shadow_bounds, shell_surface.shadow_underlay()->bounds());
812 EXPECT_EQ(shadow_bounds, shell_surface2.shadow_underlay()->bounds()); 812 EXPECT_EQ(shadow_bounds, shell_surface2.shadow_underlay()->bounds());
813 } 813 }
814 814
815 } // namespace 815 } // namespace
816 } // namespace exo 816 } // namespace exo
OLDNEW
« no previous file with comments | « chrome/browser/renderer_context_menu/render_view_context_menu.cc ('k') | components/exo/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698