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

Unified Diff: ui/views/bubble/tray_bubble_view.cc

Issue 1837093003: NOSUBMIT: Demonstrate accelerated layer painting problem in mus/mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/bubble/bubble_delegate.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/tray_bubble_view.cc
diff --git a/ui/views/bubble/tray_bubble_view.cc b/ui/views/bubble/tray_bubble_view.cc
index ad3267fe6592c034a1dffd9794ae11e4449b1bb4..59a56b7181da7b7050805d5e2b4350f43ddccbfd 100644
--- a/ui/views/bubble/tray_bubble_view.cc
+++ b/ui/views/bubble/tray_bubble_view.cc
@@ -332,10 +332,12 @@ TrayBubbleView::TrayBubbleView(gfx::NativeView parent_window,
set_notify_enter_exit_on_child(true);
set_close_on_deactivate(init_params.close_on_deactivate);
set_margins(gfx::Insets());
- SetPaintToLayer(true);
-
- bubble_content_mask_.reset(
- new TrayBubbleContentMask(bubble_border_->GetBorderCornerRadius()));
+// JAMES: This and other statements below that turn on layers cause the tray
+// bubble not to paint.
+// SetPaintToLayer(true);
+//
+// bubble_content_mask_.reset(
+// new TrayBubbleContentMask(bubble_border_->GetBorderCornerRadius()));
}
TrayBubbleView::~TrayBubbleView() {
@@ -350,7 +352,8 @@ void TrayBubbleView::InitializeAndShowBubble() {
SetAlignment(params_.arrow_alignment);
bubble_border_->UpdateArrowOffset();
- layer()->parent()->SetMaskLayer(bubble_content_mask_->layer());
+ //JAMES
+ //layer()->parent()->SetMaskLayer(bubble_content_mask_->layer());
GetWidget()->Show();
GetWidget()->GetNativeWindow()->SetEventTargeter(
@@ -361,7 +364,8 @@ void TrayBubbleView::InitializeAndShowBubble() {
void TrayBubbleView::UpdateBubble() {
if (GetWidget()) {
SizeToContents();
- bubble_content_mask_->layer()->SetBounds(layer()->bounds());
+ //JAMES
+ //bubble_content_mask_->layer()->SetBounds(layer()->bounds());
GetWidget()->GetRootView()->SchedulePaint();
}
}
@@ -504,10 +508,11 @@ void TrayBubbleView::ChildPreferredSizeChanged(View* child) {
void TrayBubbleView::ViewHierarchyChanged(
const ViewHierarchyChangedDetails& details) {
- if (details.is_add && details.child == this) {
- details.parent->SetPaintToLayer(true);
- details.parent->layer()->SetMasksToBounds(true);
- }
+//JAMES
+// if (details.is_add && details.child == this) {
+// details.parent->SetPaintToLayer(true);
+// details.parent->layer()->SetMasksToBounds(true);
+// }
}
} // namespace views
« no previous file with comments | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698