Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: cc/layers/picture_image_layer.cc

Issue 2317753002: cc: Abstract the LayerTreeHost. (Closed)
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/painted_scrollbar_layer.cc ('k') | cc/layers/picture_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/layers/painted_scrollbar_layer.cc ('k') | cc/layers/picture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698