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

Side by Side Diff: ui/views/widget/root_view.cc

Issue 2502373003: stop using SkXfermode -- use SkBlendMode instead (Closed)
Patch Set: Created 4 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/widget/root_view.h" 5 #include "ui/views/widget/root_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 mouse_pressed_handler_ = NULL; 640 mouse_pressed_handler_ = NULL;
641 mouse_move_handler_ = NULL; 641 mouse_move_handler_ = NULL;
642 gesture_handler_ = NULL; 642 gesture_handler_ = NULL;
643 event_dispatch_target_ = NULL; 643 event_dispatch_target_ = NULL;
644 old_dispatch_target_ = NULL; 644 old_dispatch_target_ = NULL;
645 } 645 }
646 } 646 }
647 647
648 void RootView::OnPaint(gfx::Canvas* canvas) { 648 void RootView::OnPaint(gfx::Canvas* canvas) {
649 if (!layer() || !layer()->fills_bounds_opaquely()) 649 if (!layer() || !layer()->fills_bounds_opaquely())
650 canvas->DrawColor(SK_ColorBLACK, SkXfermode::kClear_Mode); 650 canvas->DrawColor(SK_ColorBLACK, SkBlendMode::kClear);
651 651
652 View::OnPaint(canvas); 652 View::OnPaint(canvas);
653 } 653 }
654 654
655 gfx::Vector2d RootView::CalculateOffsetToAncestorWithLayer( 655 gfx::Vector2d RootView::CalculateOffsetToAncestorWithLayer(
656 ui::Layer** layer_parent) { 656 ui::Layer** layer_parent) {
657 gfx::Vector2d offset(View::CalculateOffsetToAncestorWithLayer(layer_parent)); 657 gfx::Vector2d offset(View::CalculateOffsetToAncestorWithLayer(layer_parent));
658 if (!layer() && layer_parent) 658 if (!layer() && layer_parent)
659 *layer_parent = widget_->GetLayer(); 659 *layer_parent = widget_->GetLayer();
660 return offset; 660 return offset;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 757
758 #ifndef NDEBUG 758 #ifndef NDEBUG
759 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); 759 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_));
760 #endif 760 #endif
761 761
762 return details; 762 return details;
763 } 763 }
764 764
765 } // namespace internal 765 } // namespace internal
766 } // namespace views 766 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698