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

Side by Side Diff: chrome/browser/chromeos/ui/focus_ring_layer.cc

Issue 464643003: Stop painting when receiving delegated frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Even more compile fixes 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/chromeos/ui/focus_ring_layer.h" 5 #include "chrome/browser/chromeos/ui/focus_ring_layer.h"
6 6
7 #include "ash/system/tray/actionable_view.h" 7 #include "ash/system/tray/actionable_view.h"
8 #include "ash/system/tray/tray_background_view.h" 8 #include "ash/system/tray/tray_background_view.h"
9 #include "ash/system/tray/tray_popup_header_button.h" 9 #include "ash/system/tray/tray_popup_header_button.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 int r = kShadowRadius; 117 int r = kShadowRadius;
118 for (int i = 0; i < r; i++) { 118 for (int i = 0; i < r; i++) {
119 // Fade out alpha quadratically. 119 // Fade out alpha quadratically.
120 paint.setAlpha((kShadowAlpha * (r - i) * (r - i)) / (r * r)); 120 paint.setAlpha((kShadowAlpha * (r - i) * (r - i)) / (r * r));
121 gfx::Rect outsetRect = bounds; 121 gfx::Rect outsetRect = bounds;
122 outsetRect.Inset(-i, -i, -i, -i); 122 outsetRect.Inset(-i, -i, -i, -i);
123 canvas->DrawRect(outsetRect, paint); 123 canvas->DrawRect(outsetRect, paint);
124 } 124 }
125 } 125 }
126 126
127 void FocusRingLayer::OnDelegatedFrameDamage(
128 const gfx::Rect& damage_rect_in_dip) {
129 }
130
127 void FocusRingLayer::OnDeviceScaleFactorChanged(float device_scale_factor) { 131 void FocusRingLayer::OnDeviceScaleFactorChanged(float device_scale_factor) {
128 Update(); 132 Update();
129 } 133 }
130 134
131 base::Closure FocusRingLayer::PrepareForLayerBoundsChange() { 135 base::Closure FocusRingLayer::PrepareForLayerBoundsChange() {
132 return base::Bind(&base::DoNothing); 136 return base::Bind(&base::DoNothing);
133 } 137 }
134 138
135 } // namespace chromeos 139 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/ui/focus_ring_layer.h ('k') | content/browser/compositor/delegated_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698