| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "config.h" | 5 #include "config.h" |
| 6 #include "WebLayerImpl.h" | 6 #include "WebLayerImpl.h" |
| 7 | 7 |
| 8 #include "CCActiveAnimation.h" | 8 #include "CCActiveAnimation.h" |
| 9 #include "LayerChromium.h" | 9 #include "LayerChromium.h" |
| 10 #include "SkMatrix44.h" | 10 #include "SkMatrix44.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 skMatrix.set(2, 3, SkDoubleToMScalar(matrix.m43())); | 51 skMatrix.set(2, 3, SkDoubleToMScalar(matrix.m43())); |
| 52 skMatrix.set(3, 3, SkDoubleToMScalar(matrix.m44())); | 52 skMatrix.set(3, 3, SkDoubleToMScalar(matrix.m44())); |
| 53 return skMatrix; | 53 return skMatrix; |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // anonymous namespace | 56 } // anonymous namespace |
| 57 | 57 |
| 58 | 58 |
| 59 WebLayer* WebLayer::create() | 59 WebLayer* WebLayer::create() |
| 60 { | 60 { |
| 61 return new WebLayerImpl(LayerChromium::create()); | 61 return new WebLayerImpl(); |
| 62 } |
| 63 |
| 64 WebLayerImpl::WebLayerImpl() |
| 65 : m_layer(LayerChromium::create()) |
| 66 { |
| 62 } | 67 } |
| 63 | 68 |
| 64 WebLayerImpl::WebLayerImpl(PassRefPtr<LayerChromium> layer) | 69 WebLayerImpl::WebLayerImpl(PassRefPtr<LayerChromium> layer) |
| 65 : m_layer(layer) | 70 : m_layer(layer) |
| 66 { | 71 { |
| 67 } | 72 } |
| 68 | 73 |
| 74 |
| 69 WebLayerImpl::~WebLayerImpl() | 75 WebLayerImpl::~WebLayerImpl() |
| 70 { | 76 { |
| 71 m_layer->clearRenderSurface(); | 77 m_layer->clearRenderSurface(); |
| 72 m_layer->setLayerAnimationDelegate(0); | 78 m_layer->setLayerAnimationDelegate(0); |
| 73 } | 79 } |
| 74 | 80 |
| 75 int WebLayerImpl::id() const | 81 int WebLayerImpl::id() const |
| 76 { | 82 { |
| 77 return m_layer->id(); | 83 return m_layer->id(); |
| 78 } | 84 } |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 { | 369 { |
| 364 m_layer->setFixedToContainerLayer(enable); | 370 m_layer->setFixedToContainerLayer(enable); |
| 365 } | 371 } |
| 366 | 372 |
| 367 LayerChromium* WebLayerImpl::layer() const | 373 LayerChromium* WebLayerImpl::layer() const |
| 368 { | 374 { |
| 369 return m_layer.get(); | 375 return m_layer.get(); |
| 370 } | 376 } |
| 371 | 377 |
| 372 } // namespace WebKit | 378 } // namespace WebKit |
| OLD | NEW |