| OLD | NEW |
| 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/aura/window.h" | 5 #include "ui/aura/window.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 } | 992 } |
| 993 | 993 |
| 994 std::unique_ptr<cc::CompositorFrameSink> Window::CreateCompositorFrameSink() { | 994 std::unique_ptr<cc::CompositorFrameSink> Window::CreateCompositorFrameSink() { |
| 995 return port_->CreateCompositorFrameSink(); | 995 return port_->CreateCompositorFrameSink(); |
| 996 } | 996 } |
| 997 | 997 |
| 998 cc::SurfaceId Window::GetSurfaceId() const { | 998 cc::SurfaceId Window::GetSurfaceId() const { |
| 999 return port_->GetSurfaceId(); | 999 return port_->GetSurfaceId(); |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 void Window::SetNeedsBeginFrames(bool needs, base::RepeatingClosure callback) { |
| 1003 port_->SetNeedsBeginFrames(needs, std::move(callback)); |
| 1004 } |
| 1005 |
| 1002 void Window::OnPaintLayer(const ui::PaintContext& context) { | 1006 void Window::OnPaintLayer(const ui::PaintContext& context) { |
| 1003 Paint(context); | 1007 Paint(context); |
| 1004 } | 1008 } |
| 1005 | 1009 |
| 1006 void Window::OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) { | 1010 void Window::OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) { |
| 1007 DCHECK(layer()); | 1011 DCHECK(layer()); |
| 1008 for (WindowObserver& observer : observers_) | 1012 for (WindowObserver& observer : observers_) |
| 1009 observer.OnDelegatedFrameDamage(this, damage_rect_in_dip); | 1013 observer.OnDelegatedFrameDamage(this, damage_rect_in_dip); |
| 1010 } | 1014 } |
| 1011 | 1015 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 layer_name = "Unnamed Window"; | 1087 layer_name = "Unnamed Window"; |
| 1084 | 1088 |
| 1085 if (id_ != -1) | 1089 if (id_ != -1) |
| 1086 layer_name += " " + base::IntToString(id_); | 1090 layer_name += " " + base::IntToString(id_); |
| 1087 | 1091 |
| 1088 layer()->set_name(layer_name); | 1092 layer()->set_name(layer_name); |
| 1089 #endif | 1093 #endif |
| 1090 } | 1094 } |
| 1091 | 1095 |
| 1092 } // namespace aura | 1096 } // namespace aura |
| OLD | NEW |