Reenable NullOpenerRedirectForksProcess, as the offending patch has been reverted
[chromium-blink-merge.git] / cc / contents_scaling_layer.cc
blobb758bd3bdcf956c18acf5e94145366fd4f4b05fe
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "cc/contents_scaling_layer.h"
6 #include "ui/gfx/size_conversions.h"
8 namespace cc {
10 ContentsScalingLayer::ContentsScalingLayer()
11 : m_contentsScale(1.0) {
14 ContentsScalingLayer::~ContentsScalingLayer() {
17 gfx::Size ContentsScalingLayer::contentBounds() const {
18 return gfx::ToCeiledSize(gfx::ScaleSize(bounds(), contentsScaleX(), contentsScaleY()));
21 float ContentsScalingLayer::contentsScaleX() const {
22 return m_contentsScale;
25 float ContentsScalingLayer::contentsScaleY() const {
26 return m_contentsScale;
29 void ContentsScalingLayer::setContentsScale(float contentsScale) {
30 if (m_contentsScale == contentsScale)
31 return;
32 m_contentsScale = contentsScale;
33 setNeedsDisplay();
36 } // namespace cc