Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_layer.h" | 5 #include "cc/layers/picture_layer.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "cc/blimp/client_picture_cache.h" | 9 #include "cc/blimp/client_picture_cache.h" |
| 10 #include "cc/blimp/engine_picture_cache.h" | 10 #include "cc/blimp/engine_picture_cache.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 recording_source_->SetNeedsDisplayRect(layer_rect); | 95 recording_source_->SetNeedsDisplayRect(layer_rect); |
| 96 Layer::SetNeedsDisplayRect(layer_rect); | 96 Layer::SetNeedsDisplayRect(layer_rect); |
| 97 } | 97 } |
| 98 | 98 |
| 99 bool PictureLayer::Update() { | 99 bool PictureLayer::Update() { |
| 100 update_source_frame_number_ = layer_tree_host()->SourceFrameNumber(); | 100 update_source_frame_number_ = layer_tree_host()->SourceFrameNumber(); |
| 101 bool updated = Layer::Update(); | 101 bool updated = Layer::Update(); |
| 102 | 102 |
| 103 gfx::Size layer_size = paint_properties().bounds; | 103 gfx::Size layer_size = paint_properties().bounds; |
| 104 | 104 |
| 105 recording_source_->SetBackgroundColor(SafeOpaqueBackgroundColor()); | 105 recording_source_->SetBackgroundColor(UseTransformedRasterization() ? SK_Color TRANSPARENT : SafeOpaqueBackgroundColor()); |
|
enne (OOO)
2017/01/03 22:53:07
This needs a comment as to why this is the case.
trchen
2017/01/14 00:46:46
Done.
| |
| 106 recording_source_->SetRequiresClear( | 106 recording_source_->SetRequiresClear( |
| 107 !contents_opaque() && | 107 !contents_opaque() && |
| 108 !picture_layer_inputs_.client->FillsBoundsCompletely()); | 108 !picture_layer_inputs_.client->FillsBoundsCompletely()); |
| 109 | 109 |
| 110 TRACE_EVENT1("cc", "PictureLayer::Update", "source_frame_number", | 110 TRACE_EVENT1("cc", "PictureLayer::Update", "source_frame_number", |
| 111 layer_tree_host()->SourceFrameNumber()); | 111 layer_tree_host()->SourceFrameNumber()); |
| 112 devtools_instrumentation::ScopedLayerTreeTask update_layer( | 112 devtools_instrumentation::ScopedLayerTreeTask update_layer( |
| 113 devtools_instrumentation::kUpdateLayer, id(), layer_tree_host()->GetId()); | 113 devtools_instrumentation::kUpdateLayer, id(), layer_tree_host()->GetId()); |
| 114 | 114 |
| 115 // UpdateAndExpandInvalidation will give us an invalidation that covers | 115 // UpdateAndExpandInvalidation will give us an invalidation that covers |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 291 return false; | 291 return false; |
| 292 | 292 |
| 293 return true; | 293 return true; |
| 294 } | 294 } |
| 295 | 295 |
| 296 const DisplayItemList* PictureLayer::GetDisplayItemList() { | 296 const DisplayItemList* PictureLayer::GetDisplayItemList() { |
| 297 return picture_layer_inputs_.display_list.get(); | 297 return picture_layer_inputs_.display_list.get(); |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace cc | 300 } // namespace cc |
| OLD | NEW |