| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/renderer/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 const WebFloatPoint& point) const { | 681 const WebFloatPoint& point) const { |
| 682 return point; | 682 return point; |
| 683 } | 683 } |
| 684 | 684 |
| 685 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) { | 685 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) { |
| 686 layer_tree_host_->SetDeviceScaleFactor(device_scale); | 686 layer_tree_host_->SetDeviceScaleFactor(device_scale); |
| 687 } | 687 } |
| 688 | 688 |
| 689 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) { | 689 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) { |
| 690 layer_tree_host_->set_background_color(color); | 690 layer_tree_host_->set_background_color(color); |
| 691 } | 691 layer_tree_host_->set_has_transparent_background(SkColorGetA(color) < |
| 692 | 692 SK_AlphaOPAQUE); |
| 693 void RenderWidgetCompositor::setHasTransparentBackground(bool transparent) { | |
| 694 layer_tree_host_->set_has_transparent_background(transparent); | |
| 695 } | 693 } |
| 696 | 694 |
| 697 void RenderWidgetCompositor::setVisible(bool visible) { | 695 void RenderWidgetCompositor::setVisible(bool visible) { |
| 698 if (never_visible_) | 696 if (never_visible_) |
| 699 return; | 697 return; |
| 700 | 698 |
| 701 layer_tree_host_->SetVisible(visible); | 699 layer_tree_host_->SetVisible(visible); |
| 702 } | 700 } |
| 703 | 701 |
| 704 void RenderWidgetCompositor::setPageScaleFactorAndLimits( | 702 void RenderWidgetCompositor::setPageScaleFactorAndLimits( |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1152 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { | 1150 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { |
| 1153 layer_tree_host_->SetContentSourceId(id); | 1151 layer_tree_host_->SetContentSourceId(id); |
| 1154 } | 1152 } |
| 1155 | 1153 |
| 1156 void RenderWidgetCompositor::SetLocalSurfaceId( | 1154 void RenderWidgetCompositor::SetLocalSurfaceId( |
| 1157 const cc::LocalSurfaceId& local_surface_id) { | 1155 const cc::LocalSurfaceId& local_surface_id) { |
| 1158 layer_tree_host_->SetLocalSurfaceId(local_surface_id); | 1156 layer_tree_host_->SetLocalSurfaceId(local_surface_id); |
| 1159 } | 1157 } |
| 1160 | 1158 |
| 1161 } // namespace content | 1159 } // namespace content |
| OLD | NEW |