| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 "cc/content_layer.h" | 5 #include "cc/content_layer.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "cc/bitmap_content_layer_updater.h" | |
| 11 #include "cc/bitmap_skpicture_content_layer_updater.h" | |
| 12 #include "cc/content_layer_client.h" | 10 #include "cc/content_layer_client.h" |
| 13 #include "cc/layer_painter.h" | 11 #include "cc/resources/bitmap_content_layer_updater.h" |
| 12 #include "cc/resources/bitmap_skpicture_content_layer_updater.h" |
| 13 #include "cc/resources/layer_painter.h" |
| 14 #include "cc/trees/layer_tree_host.h" | 14 #include "cc/trees/layer_tree_host.h" |
| 15 | 15 |
| 16 namespace cc { | 16 namespace cc { |
| 17 | 17 |
| 18 ContentLayerPainter::ContentLayerPainter(ContentLayerClient* client) | 18 ContentLayerPainter::ContentLayerPainter(ContentLayerClient* client) |
| 19 : client_(client) {} | 19 : client_(client) {} |
| 20 | 20 |
| 21 scoped_ptr<ContentLayerPainter> ContentLayerPainter::Create( | 21 scoped_ptr<ContentLayerPainter> ContentLayerPainter::Create( |
| 22 ContentLayerClient* client) { | 22 ContentLayerClient* client) { |
| 23 return make_scoped_ptr(new ContentLayerPainter(client)); | 23 return make_scoped_ptr(new ContentLayerPainter(client)); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 SetTextureFormat(texture_format); | 105 SetTextureFormat(texture_format); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void ContentLayer::SetContentsOpaque(bool opaque) { | 108 void ContentLayer::SetContentsOpaque(bool opaque) { |
| 109 Layer::SetContentsOpaque(opaque); | 109 Layer::SetContentsOpaque(opaque); |
| 110 if (updater_) | 110 if (updater_) |
| 111 updater_->SetOpaque(opaque); | 111 updater_->SetOpaque(opaque); |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace cc | 114 } // namespace cc |
| OLD | NEW |