| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "platform/graphics/compositing/PaintArtifactCompositor.h" | 5 #include "platform/graphics/compositing/PaintArtifactCompositor.h" |
| 6 | 6 |
| 7 #include "cc/layers/content_layer_client.h" | 7 #include "cc/layers/content_layer_client.h" |
| 8 #include "cc/layers/layer.h" | 8 #include "cc/layers/layer.h" |
| 9 #include "cc/layers/layer_settings.h" | 9 #include "cc/layers/layer_settings.h" |
| 10 #include "cc/layers/picture_layer.h" | 10 #include "cc/layers/picture_layer.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 gfx::Rect combinedBounds = enclosingIntRect(paintChunk.bounds); | 133 gfx::Rect combinedBounds = enclosingIntRect(paintChunk.bounds); |
| 134 scoped_refptr<cc::DisplayItemList> displayList = recordPaintChunk(paintA
rtifact, paintChunk, combinedBounds); | 134 scoped_refptr<cc::DisplayItemList> displayList = recordPaintChunk(paintA
rtifact, paintChunk, combinedBounds); |
| 135 OwnPtr<ContentLayerClientImpl> contentLayerClient = adoptPtr( | 135 OwnPtr<ContentLayerClientImpl> contentLayerClient = adoptPtr( |
| 136 new ContentLayerClientImpl(std::move(displayList), gfx::Rect(combine
dBounds.size()))); | 136 new ContentLayerClientImpl(std::move(displayList), gfx::Rect(combine
dBounds.size()))); |
| 137 | 137 |
| 138 scoped_refptr<cc::PictureLayer> layer = cc::PictureLayer::Create(cc::Lay
erSettings(), contentLayerClient.get()); | 138 scoped_refptr<cc::PictureLayer> layer = cc::PictureLayer::Create(cc::Lay
erSettings(), contentLayerClient.get()); |
| 139 layer->SetPosition(gfx::PointF(combinedBounds.origin())); | 139 layer->SetPosition(gfx::PointF(combinedBounds.origin())); |
| 140 layer->SetBounds(combinedBounds.size()); | 140 layer->SetBounds(combinedBounds.size()); |
| 141 layer->SetTransform(transformToRoot(paintChunk.properties.transform.get(
))); | 141 layer->SetTransform(transformToRoot(paintChunk.properties.transform.get(
))); |
| 142 layer->SetIsDrawable(true); | 142 layer->SetIsDrawable(true); |
| 143 if (paintChunk.knownToBeOpaque) |
| 144 layer->SetContentsOpaque(true); |
| 143 layer->SetNeedsDisplay(); | 145 layer->SetNeedsDisplay(); |
| 144 | 146 |
| 145 m_contentLayerClients.append(contentLayerClient.release()); | 147 m_contentLayerClients.append(contentLayerClient.release()); |
| 146 m_rootLayer->AddChild(std::move(layer)); | 148 m_rootLayer->AddChild(std::move(layer)); |
| 147 } | 149 } |
| 148 } | 150 } |
| 149 | 151 |
| 150 } // namespace blink | 152 } // namespace blink |
| OLD | NEW |