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

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

Issue 2230513005: Move visual rect unioning between paired items to cc::DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review feedback. Created 4 years, 4 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/blink/web_display_item_list_impl.cc ('k') | cc/playback/display_item_list.h » ('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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 =
78 SkFloatToScalar(static_cast<float>(bounds().height()) / image_->height()); 78 SkFloatToScalar(static_cast<float>(bounds().height()) / image_->height());
79 canvas->scale(content_to_layer_scale_x, content_to_layer_scale_y); 79 canvas->scale(content_to_layer_scale_x, content_to_layer_scale_y);
80 80
81 // Because Android WebView resourceless software draw mode rasters directly 81 // Because Android WebView resourceless software draw mode rasters directly
82 // to the root canvas, this draw must use the kSrcOver_Mode so that 82 // to the root canvas, this draw must use the kSrcOver_Mode so that
83 // transparent images blend correctly. 83 // transparent images blend correctly.
84 canvas->drawImage(image_.get(), 0, 0); 84 canvas->drawImage(image_.get(), 0, 0);
85 85
86 display_list->CreateAndAppendItem<DrawingDisplayItem>( 86 display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
87 PaintableRegion(), recorder.finishRecordingAsPicture()); 87 PaintableRegion(), recorder.finishRecordingAsPicture());
88 88
89 display_list->Finalize(); 89 display_list->Finalize();
90 return display_list; 90 return display_list;
91 } 91 }
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/blink/web_display_item_list_impl.cc ('k') | cc/playback/display_item_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698