| 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/layers/picture_image_layer.h" | 5 #include "cc/layers/picture_image_layer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "cc/layers/picture_layer_impl.h" | 9 #include "cc/layers/picture_layer_impl.h" |
| 10 #include "cc/playback/display_item_list_settings.h" | 10 #include "cc/playback/display_item_list_settings.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 scoped_refptr<DisplayItemList> PictureImageLayer::PaintContentsToDisplayList( | 58 scoped_refptr<DisplayItemList> PictureImageLayer::PaintContentsToDisplayList( |
| 59 ContentLayerClient::PaintingControlSetting painting_control) { | 59 ContentLayerClient::PaintingControlSetting painting_control) { |
| 60 DCHECK(image_); | 60 DCHECK(image_); |
| 61 DCHECK_GT(image_->width(), 0); | 61 DCHECK_GT(image_->width(), 0); |
| 62 DCHECK_GT(image_->height(), 0); | 62 DCHECK_GT(image_->height(), 0); |
| 63 DCHECK(layer_tree_host()); | 63 DCHECK(layer_tree_host()); |
| 64 | 64 |
| 65 DisplayItemListSettings settings; | 65 DisplayItemListSettings settings; |
| 66 settings.use_cached_picture = | 66 settings.use_cached_picture = |
| 67 layer_tree_host()->settings().use_cached_picture_raster; | 67 layer_tree_host()->GetSettings().use_cached_picture_raster; |
| 68 scoped_refptr<DisplayItemList> display_list = | 68 scoped_refptr<DisplayItemList> display_list = |
| 69 DisplayItemList::Create(settings); | 69 DisplayItemList::Create(settings); |
| 70 | 70 |
| 71 SkPictureRecorder recorder; | 71 SkPictureRecorder recorder; |
| 72 SkCanvas* canvas = | 72 SkCanvas* canvas = |
| 73 recorder.beginRecording(gfx::RectToSkRect(PaintableRegion())); | 73 recorder.beginRecording(gfx::RectToSkRect(PaintableRegion())); |
| 74 | 74 |
| 75 SkScalar content_to_layer_scale_x = | 75 SkScalar content_to_layer_scale_x = |
| 76 SkFloatToScalar(static_cast<float>(bounds().width()) / image_->width()); | 76 SkFloatToScalar(static_cast<float>(bounds().width()) / image_->width()); |
| 77 SkScalar content_to_layer_scale_y = | 77 SkScalar content_to_layer_scale_y = |
| (...skipping 14 matching lines...) Expand all Loading... |
| 92 | 92 |
| 93 bool PictureImageLayer::FillsBoundsCompletely() const { | 93 bool PictureImageLayer::FillsBoundsCompletely() const { |
| 94 return false; | 94 return false; |
| 95 } | 95 } |
| 96 | 96 |
| 97 size_t PictureImageLayer::GetApproximateUnsharedMemoryUsage() const { | 97 size_t PictureImageLayer::GetApproximateUnsharedMemoryUsage() const { |
| 98 return 0; | 98 return 0; |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace cc | 101 } // namespace cc |
| OLD | NEW |