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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp

Issue 1714523005: WIP: backface visibility plumbing (not for review) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: still broken Created 4 years, 10 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
OLDNEW
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // this transform. 267 // this transform.
268 FloatPoint offsetDueToClipOffset = clip->clipRect().rect().location( ); 268 FloatPoint offsetDueToClipOffset = clip->clipRect().rect().location( );
269 offset -= gfx::Vector2dF(offsetDueToClipOffset.x(), offsetDueToClipO ffset.y()); 269 offset -= gfx::Vector2dF(offsetDueToClipOffset.x(), offsetDueToClipO ffset.y());
270 } 270 }
271 transform.Translate(offset.x(), offset.y()); 271 transform.Translate(offset.x(), offset.y());
272 272
273 scoped_refptr<cc::PictureLayer> layer = cc::PictureLayer::Create(cc::Lay erSettings(), contentLayerClient.get()); 273 scoped_refptr<cc::PictureLayer> layer = cc::PictureLayer::Create(cc::Lay erSettings(), contentLayerClient.get());
274 layer->SetBounds(combinedBounds.size()); 274 layer->SetBounds(combinedBounds.size());
275 layer->SetTransform(transform); 275 layer->SetTransform(transform);
276 layer->SetIsDrawable(true); 276 layer->SetIsDrawable(true);
277 layer->SetDoubleSided(!paintChunk.properties.backfaceHidden);
277 if (paintChunk.knownToBeOpaque) 278 if (paintChunk.knownToBeOpaque)
278 layer->SetContentsOpaque(true); 279 layer->SetContentsOpaque(true);
279 layer->SetNeedsDisplay(); 280 layer->SetNeedsDisplay();
280 281
281 m_contentLayerClients.append(contentLayerClient.release()); 282 m_contentLayerClients.append(contentLayerClient.release());
282 parent->AddChild(std::move(layer)); 283 parent->AddChild(std::move(layer));
283 } 284 }
284 } 285 }
285 286
286 } // namespace blink 287 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698