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

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

Issue 464643003: Stop painting when receiving delegated frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix crashes Created 6 years, 4 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 | Annotate | Revision Log
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 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 } 1458 }
1459 } 1459 }
1460 } 1460 }
1461 1461
1462 void View::OnPaintLayer(gfx::Canvas* canvas) { 1462 void View::OnPaintLayer(gfx::Canvas* canvas) {
1463 if (!layer() || !layer()->fills_bounds_opaquely()) 1463 if (!layer() || !layer()->fills_bounds_opaquely())
1464 canvas->DrawColor(SK_ColorBLACK, SkXfermode::kClear_Mode); 1464 canvas->DrawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
1465 PaintCommon(canvas, CullSet()); 1465 PaintCommon(canvas, CullSet());
1466 } 1466 }
1467 1467
1468 void View::OnDelegatedFrameDamage(
1469 const gfx::Rect& damage_rect_in_dip) {
1470 }
1471
1468 void View::OnDeviceScaleFactorChanged(float device_scale_factor) { 1472 void View::OnDeviceScaleFactorChanged(float device_scale_factor) {
1469 snap_layer_to_pixel_boundary_ = 1473 snap_layer_to_pixel_boundary_ =
1470 (device_scale_factor - std::floor(device_scale_factor)) != 0.0f; 1474 (device_scale_factor - std::floor(device_scale_factor)) != 0.0f;
1471 SnapLayerToPixelBoundary(); 1475 SnapLayerToPixelBoundary();
1472 // Repainting with new scale factor will paint the content at the right scale. 1476 // Repainting with new scale factor will paint the content at the right scale.
1473 } 1477 }
1474 1478
1475 base::Closure View::PrepareForLayerBoundsChange() { 1479 base::Closure View::PrepareForLayerBoundsChange() {
1476 return base::Closure(); 1480 return base::Closure();
1477 } 1481 }
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 // Message the RootView to do the drag and drop. That way if we're removed 2442 // Message the RootView to do the drag and drop. That way if we're removed
2439 // the RootView can detect it and avoid calling us back. 2443 // the RootView can detect it and avoid calling us back.
2440 gfx::Point widget_location(event.location()); 2444 gfx::Point widget_location(event.location());
2441 ConvertPointToWidget(this, &widget_location); 2445 ConvertPointToWidget(this, &widget_location);
2442 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2446 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2443 // WARNING: we may have been deleted. 2447 // WARNING: we may have been deleted.
2444 return true; 2448 return true;
2445 } 2449 }
2446 2450
2447 } // namespace views 2451 } // namespace views
OLDNEW
« ui/compositor/layer.cc ('K') | « ui/views/view.h ('k') | ui/wm/core/image_grid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698