| Index: components/exo/surface.cc
|
| diff --git a/components/exo/surface.cc b/components/exo/surface.cc
|
| index f186ef93706b6d14d465c063e53e4b9035a3b029..2c614373b45f65d1b09bd785036e7de8b85ac71e 100644
|
| --- a/components/exo/surface.cc
|
| +++ b/components/exo/surface.cc
|
| @@ -108,7 +108,9 @@ class CustomWindowDelegate : public aura::WindowDelegate {
|
| bool CanFocus() override { return true; }
|
| void OnCaptureLost() override {}
|
| void OnPaint(const ui::PaintContext& context) override {}
|
| - void OnDeviceScaleFactorChanged(float device_scale_factor) override {}
|
| + void OnDeviceScaleFactorChanged(float device_scale_factor) override {
|
| + surface_->SetDeviceScaleFactor(device_scale_factor);
|
| + }
|
| void OnWindowDestroying(aura::Window* window) override {}
|
| void OnWindowDestroyed(aura::Window* window) override { delete this; }
|
| void OnWindowTargetVisibilityChanged(bool visible) override {}
|
| @@ -405,6 +407,10 @@ void Surface::SetAlpha(float alpha) {
|
| pending_state_.alpha = alpha;
|
| }
|
|
|
| +void Surface::SetDeviceScaleFactor(float device_scale_factor) {
|
| + device_scale_factor_ = device_scale_factor;
|
| +}
|
| +
|
| void Surface::Commit() {
|
| TRACE_EVENT0("exo", "Surface::Commit");
|
|
|
| @@ -847,6 +853,7 @@ void Surface::UpdateSurface(bool full_damage) {
|
| current_begin_frame_ack_.has_damage = true;
|
| }
|
| frame.metadata.begin_frame_ack = current_begin_frame_ack_;
|
| + frame.metadata.device_scale_factor = device_scale_factor_;
|
|
|
| if (current_resource_.id) {
|
| // Texture quad is only needed if buffer is not fully transparent.
|
|
|