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

Side by Side Diff: ui/views/view.cc

Issue 2825783002: views: Remove the canvas bounds from View traces. (Closed)
Patch Set: viewtraces: . Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first.
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 RecursivePaintHelper(&View::Paint, context); 1545 RecursivePaintHelper(&View::Paint, context);
1546 } 1546 }
1547 1547
1548 void View::OnPaint(gfx::Canvas* canvas) { 1548 void View::OnPaint(gfx::Canvas* canvas) {
1549 TRACE_EVENT1("views", "View::OnPaint", "class", GetClassName()); 1549 TRACE_EVENT1("views", "View::OnPaint", "class", GetClassName());
1550 OnPaintBackground(canvas); 1550 OnPaintBackground(canvas);
1551 OnPaintBorder(canvas); 1551 OnPaintBorder(canvas);
1552 } 1552 }
1553 1553
1554 void View::OnPaintBackground(gfx::Canvas* canvas) { 1554 void View::OnPaintBackground(gfx::Canvas* canvas) {
1555 if (background_.get()) { 1555 if (background_) {
1556 TRACE_EVENT2("views", "View::OnPaintBackground", 1556 TRACE_EVENT0("views", "View::OnPaintBackground");
1557 "width", canvas->sk_canvas()->getBaseLayerSize().width(),
1558 "height", canvas->sk_canvas()->getBaseLayerSize().height());
1559 background_->Paint(canvas, this); 1557 background_->Paint(canvas, this);
1560 } 1558 }
1561 } 1559 }
1562 1560
1563 void View::OnPaintBorder(gfx::Canvas* canvas) { 1561 void View::OnPaintBorder(gfx::Canvas* canvas) {
1564 if (border_.get()) { 1562 if (border_) {
1565 TRACE_EVENT2("views", "View::OnPaintBorder", 1563 TRACE_EVENT0("views", "View::OnPaintBorder");
1566 "width", canvas->sk_canvas()->getBaseLayerSize().width(),
1567 "height", canvas->sk_canvas()->getBaseLayerSize().height());
1568 border_->Paint(*this, canvas); 1564 border_->Paint(*this, canvas);
1569 } 1565 }
1570 } 1566 }
1571 1567
1572 // Accelerated Painting -------------------------------------------------------- 1568 // Accelerated Painting --------------------------------------------------------
1573 1569
1574 gfx::Vector2d View::CalculateOffsetToAncestorWithLayer( 1570 gfx::Vector2d View::CalculateOffsetToAncestorWithLayer(
1575 ui::Layer** layer_parent) { 1571 ui::Layer** layer_parent) {
1576 if (layer()) { 1572 if (layer()) {
1577 if (layer_parent) 1573 if (layer_parent)
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
2644 // Message the RootView to do the drag and drop. That way if we're removed 2640 // Message the RootView to do the drag and drop. That way if we're removed
2645 // the RootView can detect it and avoid calling us back. 2641 // the RootView can detect it and avoid calling us back.
2646 gfx::Point widget_location(event.location()); 2642 gfx::Point widget_location(event.location());
2647 ConvertPointToWidget(this, &widget_location); 2643 ConvertPointToWidget(this, &widget_location);
2648 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2644 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2649 // WARNING: we may have been deleted. 2645 // WARNING: we may have been deleted.
2650 return true; 2646 return true;
2651 } 2647 }
2652 2648
2653 } // namespace views 2649 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698