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

Side by Side Diff: third_party/WebKit/Source/web/LinkHighlightImpl.cpp

Issue 2389973002: Use std::unique_ptr to signal ownership transfer in WebCompositorSupport (Closed)
Patch Set: rebase Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 m_currentGraphicsLayer(0), 80 m_currentGraphicsLayer(0),
81 m_isScrollingGraphicsLayer(false), 81 m_isScrollingGraphicsLayer(false),
82 m_geometryNeedsUpdate(false), 82 m_geometryNeedsUpdate(false),
83 m_isAnimating(false), 83 m_isAnimating(false),
84 m_startTime(monotonicallyIncreasingTime()) { 84 m_startTime(monotonicallyIncreasingTime()) {
85 DCHECK(m_node); 85 DCHECK(m_node);
86 DCHECK(owningWebViewImpl); 86 DCHECK(owningWebViewImpl);
87 WebCompositorSupport* compositorSupport = 87 WebCompositorSupport* compositorSupport =
88 Platform::current()->compositorSupport(); 88 Platform::current()->compositorSupport();
89 DCHECK(compositorSupport); 89 DCHECK(compositorSupport);
90 m_contentLayer = wrapUnique(compositorSupport->createContentLayer(this)); 90 m_contentLayer = compositorSupport->createContentLayer(this);
91 m_clipLayer = wrapUnique(compositorSupport->createLayer()); 91 m_clipLayer = compositorSupport->createLayer();
92 m_clipLayer->setTransformOrigin(WebFloatPoint3D()); 92 m_clipLayer->setTransformOrigin(WebFloatPoint3D());
93 m_clipLayer->addChild(m_contentLayer->layer()); 93 m_clipLayer->addChild(m_contentLayer->layer());
94 94
95 m_compositorPlayer = CompositorAnimationPlayer::create(); 95 m_compositorPlayer = CompositorAnimationPlayer::create();
96 DCHECK(m_compositorPlayer); 96 DCHECK(m_compositorPlayer);
97 m_compositorPlayer->setAnimationDelegate(this); 97 m_compositorPlayer->setAnimationDelegate(this);
98 if (m_owningWebViewImpl->linkHighlightsTimeline()) 98 if (m_owningWebViewImpl->linkHighlightsTimeline())
99 m_owningWebViewImpl->linkHighlightsTimeline()->playerAttached(*this); 99 m_owningWebViewImpl->linkHighlightsTimeline()->playerAttached(*this);
100 100
101 CompositorElementId elementId = createCompositorElementId( 101 CompositorElementId elementId = createCompositorElementId(
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 WebLayer* LinkHighlightImpl::layer() { 444 WebLayer* LinkHighlightImpl::layer() {
445 return clipLayer(); 445 return clipLayer();
446 } 446 }
447 447
448 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const { 448 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const {
449 return m_compositorPlayer.get(); 449 return m_compositorPlayer.get();
450 } 450 }
451 451
452 } // namespace blink 452 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698