e0d8cc8fc7d35783827912f62971c53fd080067d
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / mac / PlatformCALayerRemote.cpp
1 /*
2  * Copyright (C) 2013 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #include "config.h"
27 #import "PlatformCALayerRemote.h"
28
29 #import "PlatformCALayerRemoteCustom.h"
30 #import "PlatformCALayerRemoteTiledBacking.h"
31 #import "RemoteLayerBackingStore.h"
32 #import "RemoteLayerTreeContext.h"
33 #import "RemoteLayerTreePropertyApplier.h"
34 #import <WebCore/AnimationUtilities.h>
35 #import <WebCore/GraphicsContext.h>
36 #import <WebCore/GraphicsLayerCA.h>
37 #import <WebCore/LengthFunctions.h>
38 #import <WebCore/PlatformCAFilters.h>
39 #import <WebCore/PlatformCALayerMac.h>
40 #import <WebCore/TiledBacking.h>
41 #import <wtf/CurrentTime.h>
42 #import <wtf/RetainPtr.h>
43
44 using namespace WebCore;
45
46 namespace WebKit {
47
48 PassRefPtr<PlatformCALayerRemote> PlatformCALayerRemote::create(LayerType layerType, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
49 {
50     RefPtr<PlatformCALayerRemote> layer;
51
52     if (layerType == LayerTypeTiledBackingLayer ||  layerType == LayerTypePageTiledBackingLayer)
53         layer = adoptRef(new PlatformCALayerRemoteTiledBacking(layerType, owner, context));
54     else
55         layer = adoptRef(new PlatformCALayerRemote(layerType, owner, context));
56
57     context->layerWasCreated(layer.get(), layerType);
58
59     return layer.release();
60 }
61
62 PassRefPtr<PlatformCALayerRemote> PlatformCALayerRemote::create(PlatformLayer *platformLayer, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
63 {
64     RefPtr<PlatformCALayerRemote> layer = adoptRef(new PlatformCALayerRemoteCustom(static_cast<PlatformLayer*>(platformLayer), owner, context));
65
66     context->layerWasCreated(layer.get(), LayerTypeCustom);
67
68     return layer.release();
69 }
70
71 PassRefPtr<PlatformCALayerRemote> PlatformCALayerRemote::create(const PlatformCALayerRemote& other, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
72 {
73     RefPtr<PlatformCALayerRemote> layer = adoptRef(new PlatformCALayerRemote(other, owner, context));
74
75     context->layerWasCreated(layer.get(), other.layerType());
76
77     return layer.release();
78 }
79
80 PlatformCALayerRemote::PlatformCALayerRemote(LayerType layerType, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
81     : PlatformCALayer(layerType, owner)
82     , m_superlayer(nullptr)
83     , m_maskLayer(nullptr)
84     , m_acceleratesDrawing(false)
85     , m_context(context)
86 {
87     if (owner)
88         m_properties.contentsScale = owner->platformCALayerDeviceScaleFactor();
89 }
90
91 PlatformCALayerRemote::PlatformCALayerRemote(const PlatformCALayerRemote& other, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
92     : PlatformCALayer(other.layerType(), owner)
93     , m_properties(other.m_properties)
94     , m_superlayer(nullptr)
95     , m_maskLayer(nullptr)
96     , m_acceleratesDrawing(other.acceleratesDrawing())
97     , m_context(context)
98 {
99 }
100
101 PassRefPtr<PlatformCALayer> PlatformCALayerRemote::clone(PlatformCALayerClient* client) const
102 {
103     RefPtr<PlatformCALayerRemote> clone = PlatformCALayerRemote::create(*this, client, m_context);
104
105     clone->m_properties.notePropertiesChanged(static_cast<RemoteLayerTreeTransaction::LayerChange>(m_properties.everChangedProperties & ~RemoteLayerTreeTransaction::BackingStoreChanged));
106
107     return clone.release();
108 }
109
110 PlatformCALayerRemote::~PlatformCALayerRemote()
111 {
112     for (const auto& layer : m_children)
113         toPlatformCALayerRemote(layer.get())->m_superlayer = nullptr;
114
115     if (m_context)
116         m_context->layerWillBeDestroyed(this);
117 }
118
119 void PlatformCALayerRemote::recursiveBuildTransaction(RemoteLayerTreeTransaction& transaction)
120 {
121     ASSERT(owner());
122     if (m_properties.backingStore && (!owner() || !owner()->platformCALayerDrawsContent())) {
123         m_properties.backingStore = nullptr;
124         m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged);
125     }
126
127     if (m_properties.backingStore && m_properties.backingStore->display())
128         m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged);
129
130     if (m_properties.changedProperties != RemoteLayerTreeTransaction::NoChange) {
131         if (m_properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) {
132             m_properties.children.clear();
133             for (const auto& layer : m_children)
134                 m_properties.children.append(layer->layerID());
135         }
136
137         if (m_layerType == LayerTypeCustom) {
138             RemoteLayerTreePropertyApplier::applyProperties(platformLayer(), nullptr, m_properties, RemoteLayerTreePropertyApplier::RelatedLayerMap());
139             didCommit();
140             return;
141         }
142
143         transaction.layerPropertiesChanged(this, m_properties);
144     }
145
146     for (size_t i = 0; i < m_children.size(); ++i) {
147         PlatformCALayerRemote* child = toPlatformCALayerRemote(m_children[i].get());
148         ASSERT(child->superlayer() == this);
149         child->recursiveBuildTransaction(transaction);
150     }
151
152     if (m_maskLayer)
153         m_maskLayer->recursiveBuildTransaction(transaction);
154 }
155
156 void PlatformCALayerRemote::didCommit()
157 {
158     m_properties.addedAnimations.clear();
159     m_properties.keyPathsOfAnimationsToRemove.clear();
160     m_properties.resetChangedProperties();
161 }
162
163 void PlatformCALayerRemote::animationStarted(CFTimeInterval beginTime)
164 {
165     if (m_owner)
166         m_owner->platformCALayerAnimationStarted(beginTime);
167 }
168
169 void PlatformCALayerRemote::ensureBackingStore()
170 {
171     if (!m_properties.backingStore)
172         m_properties.backingStore = std::make_unique<RemoteLayerBackingStore>(m_context);
173
174     updateBackingStore();
175 }
176
177 void PlatformCALayerRemote::updateBackingStore()
178 {
179     if (!m_properties.backingStore)
180         return;
181
182     m_properties.backingStore->ensureBackingStore(this, expandedIntSize(m_properties.bounds.size()), m_properties.contentsScale, m_acceleratesDrawing, m_properties.opaque);
183 }
184
185 void PlatformCALayerRemote::setNeedsDisplay(const FloatRect* rect)
186 {
187     ensureBackingStore();
188
189     if (!rect) {
190         m_properties.backingStore->setNeedsDisplay();
191         return;
192     }
193
194     // FIXME: Need to map this through contentsRect/etc.
195     m_properties.backingStore->setNeedsDisplay(enclosingIntRect(*rect));
196 }
197
198 void PlatformCALayerRemote::setContentsChanged()
199 {
200 }
201
202 PlatformCALayer* PlatformCALayerRemote::superlayer() const
203 {
204     return m_superlayer;
205 }
206
207 void PlatformCALayerRemote::removeFromSuperlayer()
208 {
209     if (!m_superlayer)
210         return;
211
212     m_superlayer->removeSublayer(this);
213 }
214
215 void PlatformCALayerRemote::removeSublayer(PlatformCALayerRemote* layer)
216 {
217     size_t childIndex = m_children.find(layer);
218     if (childIndex != notFound)
219         m_children.remove(childIndex);
220     layer->m_superlayer = nullptr;
221     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
222 }
223
224 void PlatformCALayerRemote::setSublayers(const PlatformCALayerList& list)
225 {
226     removeAllSublayers();
227     m_children = list;
228
229     for (const auto& layer : list) {
230         layer->removeFromSuperlayer();
231         toPlatformCALayerRemote(layer.get())->m_superlayer = this;
232     }
233
234     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
235 }
236
237 void PlatformCALayerRemote::removeAllSublayers()
238 {
239     PlatformCALayerList layersToRemove = m_children;
240     for (const auto& layer : layersToRemove)
241         layer->removeFromSuperlayer();
242     ASSERT(m_children.isEmpty());
243     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
244 }
245
246 void PlatformCALayerRemote::appendSublayer(PlatformCALayer* layer)
247 {
248     RefPtr<PlatformCALayer> layerProtector(layer);
249
250     layer->removeFromSuperlayer();
251     m_children.append(layer);
252     toPlatformCALayerRemote(layer)->m_superlayer = this;
253     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
254 }
255
256 void PlatformCALayerRemote::insertSublayer(PlatformCALayer* layer, size_t index)
257 {
258     RefPtr<PlatformCALayer> layerProtector(layer);
259
260     layer->removeFromSuperlayer();
261     m_children.insert(index, layer);
262     toPlatformCALayerRemote(layer)->m_superlayer = this;
263     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
264 }
265
266 void PlatformCALayerRemote::replaceSublayer(PlatformCALayer* reference, PlatformCALayer* layer)
267 {
268     ASSERT(reference->superlayer() == this);
269     RefPtr<PlatformCALayer> layerProtector(layer);
270
271     layer->removeFromSuperlayer();
272     size_t referenceIndex = m_children.find(reference);
273     if (referenceIndex != notFound) {
274         m_children[referenceIndex]->removeFromSuperlayer();
275         m_children.insert(referenceIndex, layer);
276         toPlatformCALayerRemote(layer)->m_superlayer = this;
277     }
278
279     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
280 }
281
282 void PlatformCALayerRemote::adoptSublayers(PlatformCALayer* source)
283 {
284     PlatformCALayerList layersToMove = toPlatformCALayerRemote(source)->m_children;
285
286     if (const PlatformCALayerList* customLayers = source->customSublayers()) {
287         for (const auto& layer : *customLayers) {
288             size_t layerIndex = layersToMove.find(layer);
289             if (layerIndex != notFound)
290                 layersToMove.remove(layerIndex);
291         }
292     }
293
294     setSublayers(layersToMove);
295 }
296
297 void PlatformCALayerRemote::addAnimationForKey(const String& key, PlatformCAAnimation* animation)
298 {
299     m_properties.addedAnimations.set(key, toPlatformCAAnimationRemote(animation)->properties());
300     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnimationsChanged);
301
302     if (m_context)
303         m_context->willStartAnimationOnLayer(this);
304 }
305
306 void PlatformCALayerRemote::removeAnimationForKey(const String& key)
307 {
308     m_properties.addedAnimations.remove(key);
309     m_properties.keyPathsOfAnimationsToRemove.add(key);
310     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnimationsChanged);
311 }
312
313 PassRefPtr<PlatformCAAnimation> PlatformCALayerRemote::animationForKey(const String& key)
314 {
315     // FIXME: implement.
316     return nullptr;
317 }
318
319 void PlatformCALayerRemote::setMask(PlatformCALayer* layer)
320 {
321     if (layer) {
322         m_maskLayer = toPlatformCALayerRemote(layer);
323         m_properties.maskLayerID = m_maskLayer->layerID();
324     } else {
325         m_maskLayer = nullptr;
326         m_properties.maskLayerID = 0;
327     }
328
329     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::MaskLayerChanged);
330 }
331
332 bool PlatformCALayerRemote::isOpaque() const
333 {
334     return m_properties.opaque;
335 }
336
337 void PlatformCALayerRemote::setOpaque(bool value)
338 {
339     m_properties.opaque = value;
340     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::OpaqueChanged);
341
342     updateBackingStore();
343 }
344
345 FloatRect PlatformCALayerRemote::bounds() const
346 {
347     return m_properties.bounds;
348 }
349
350 void PlatformCALayerRemote::setBounds(const FloatRect& value)
351 {
352     if (value == m_properties.bounds)
353         return;
354
355     m_properties.bounds = value;
356     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BoundsChanged);
357     
358     if (requiresCustomAppearanceUpdateOnBoundsChange())
359         m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::CustomAppearanceChanged);
360
361     updateBackingStore();
362 }
363
364 FloatPoint3D PlatformCALayerRemote::position() const
365 {
366     return m_properties.position;
367 }
368
369 void PlatformCALayerRemote::setPosition(const FloatPoint3D& value)
370 {
371     if (value == m_properties.position)
372         return;
373
374     m_properties.position = value;
375     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::PositionChanged);
376 }
377
378 FloatPoint3D PlatformCALayerRemote::anchorPoint() const
379 {
380     return m_properties.anchorPoint;
381 }
382
383 void PlatformCALayerRemote::setAnchorPoint(const FloatPoint3D& value)
384 {
385     if (value == m_properties.anchorPoint)
386         return;
387
388     m_properties.anchorPoint = value;
389     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnchorPointChanged);
390 }
391
392 TransformationMatrix PlatformCALayerRemote::transform() const
393 {
394     return m_properties.transform ? *m_properties.transform : TransformationMatrix();
395 }
396
397 void PlatformCALayerRemote::setTransform(const TransformationMatrix& value)
398 {
399     m_properties.transform = std::make_unique<TransformationMatrix>(value);
400     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::TransformChanged);
401 }
402
403 TransformationMatrix PlatformCALayerRemote::sublayerTransform() const
404 {
405     return m_properties.sublayerTransform ? *m_properties.sublayerTransform : TransformationMatrix();
406 }
407
408 void PlatformCALayerRemote::setSublayerTransform(const TransformationMatrix& value)
409 {
410     m_properties.sublayerTransform = std::make_unique<TransformationMatrix>(value);
411     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::SublayerTransformChanged);
412 }
413
414 void PlatformCALayerRemote::setHidden(bool value)
415 {
416     m_properties.hidden = value;
417     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::HiddenChanged);
418 }
419
420 void PlatformCALayerRemote::setGeometryFlipped(bool value)
421 {
422     m_properties.geometryFlipped = value;
423     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::GeometryFlippedChanged);
424 }
425
426 bool PlatformCALayerRemote::isDoubleSided() const
427 {
428     return m_properties.doubleSided;
429 }
430
431 void PlatformCALayerRemote::setDoubleSided(bool value)
432 {
433     m_properties.doubleSided = value;
434     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::DoubleSidedChanged);
435 }
436
437 bool PlatformCALayerRemote::masksToBounds() const
438 {
439     return m_properties.masksToBounds;
440 }
441
442 void PlatformCALayerRemote::setMasksToBounds(bool value)
443 {
444     if (value == m_properties.masksToBounds)
445         return;
446
447     m_properties.masksToBounds = value;
448     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::MasksToBoundsChanged);
449 }
450
451 bool PlatformCALayerRemote::acceleratesDrawing() const
452 {
453     return m_acceleratesDrawing;
454 }
455
456 void PlatformCALayerRemote::setAcceleratesDrawing(bool acceleratesDrawing)
457 {
458     m_acceleratesDrawing = acceleratesDrawing;
459     updateBackingStore();
460 }
461
462 CFTypeRef PlatformCALayerRemote::contents() const
463 {
464     return nullptr;
465 }
466
467 void PlatformCALayerRemote::setContents(CFTypeRef value)
468 {
469 }
470
471 void PlatformCALayerRemote::setContentsRect(const FloatRect& value)
472 {
473     m_properties.contentsRect = value;
474     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ContentsRectChanged);
475 }
476
477 void PlatformCALayerRemote::setMinificationFilter(FilterType value)
478 {
479     m_properties.minificationFilter = value;
480     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::MinificationFilterChanged);
481 }
482
483 void PlatformCALayerRemote::setMagnificationFilter(FilterType value)
484 {
485     m_properties.magnificationFilter = value;
486     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::MagnificationFilterChanged);
487 }
488
489 Color PlatformCALayerRemote::backgroundColor() const
490 {
491     return m_properties.backgroundColor;
492 }
493
494 void PlatformCALayerRemote::setBackgroundColor(const Color& value)
495 {
496     m_properties.backgroundColor = value;
497     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackgroundColorChanged);
498 }
499
500 void PlatformCALayerRemote::setBorderWidth(float value)
501 {
502     if (value == m_properties.borderWidth)
503         return;
504
505     m_properties.borderWidth = value;
506     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BorderWidthChanged);
507 }
508
509 void PlatformCALayerRemote::setBorderColor(const Color& value)
510 {
511     if (value == m_properties.borderColor)
512         return;
513
514     m_properties.borderColor = value;
515     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BorderColorChanged);
516 }
517
518 float PlatformCALayerRemote::opacity() const
519 {
520     return m_properties.opacity;
521 }
522
523 void PlatformCALayerRemote::setOpacity(float value)
524 {
525     m_properties.opacity = value;
526     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::OpacityChanged);
527 }
528
529 #if ENABLE(CSS_FILTERS)
530 void PlatformCALayerRemote::setFilters(const FilterOperations& filters)
531 {
532     m_properties.filters = std::make_unique<FilterOperations>(filters);
533     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::FiltersChanged);
534 }
535
536 void PlatformCALayerRemote::copyFiltersFrom(const PlatformCALayer* sourceLayer)
537 {
538     ASSERT_NOT_REACHED();
539 }
540
541 #if ENABLE(CSS_COMPOSITING)
542 void PlatformCALayerRemote::setBlendMode(BlendMode blendMode)
543 {
544     m_properties.blendMode = blendMode;
545     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BlendModeChanged);
546 }
547 #endif
548
549 bool PlatformCALayerRemote::filtersCanBeComposited(const FilterOperations& filters)
550 {
551     return PlatformCALayerMac::filtersCanBeComposited(filters);
552 }
553 #endif
554
555 void PlatformCALayerRemote::setName(const String& value)
556 {
557     m_properties.name = value;
558     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::NameChanged);
559 }
560
561 void PlatformCALayerRemote::setSpeed(float value)
562 {
563     m_properties.speed = value;
564     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::SpeedChanged);
565 }
566
567 void PlatformCALayerRemote::setTimeOffset(CFTimeInterval value)
568 {
569     m_properties.timeOffset = value;
570     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::TimeOffsetChanged);
571 }
572
573 float PlatformCALayerRemote::contentsScale() const
574 {
575     return m_properties.contentsScale;
576 }
577
578 void PlatformCALayerRemote::setContentsScale(float value)
579 {
580     m_properties.contentsScale = value;
581     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ContentsScaleChanged);
582
583     updateBackingStore();
584 }
585
586 void PlatformCALayerRemote::setEdgeAntialiasingMask(unsigned value)
587 {
588     m_properties.edgeAntialiasingMask = value;
589     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::EdgeAntialiasingMaskChanged);
590 }
591
592 bool PlatformCALayerRemote::requiresCustomAppearanceUpdateOnBoundsChange() const
593 {
594     return m_properties.customAppearance == GraphicsLayer::ScrollingShadow;
595 }
596
597 GraphicsLayer::CustomAppearance PlatformCALayerRemote::customAppearance() const
598 {
599     return m_properties.customAppearance;
600 }
601
602 void PlatformCALayerRemote::updateCustomAppearance(GraphicsLayer::CustomAppearance customAppearance)
603 {
604     m_properties.customAppearance = customAppearance;
605     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::CustomAppearanceChanged);
606 }
607
608 GraphicsLayer::CustomBehavior PlatformCALayerRemote::customBehavior() const
609 {
610     return m_properties.customBehavior;
611 }
612
613 void PlatformCALayerRemote::updateCustomBehavior(GraphicsLayer::CustomBehavior customBehavior)
614 {
615     m_properties.customBehavior = customBehavior;
616     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::CustomBehaviorChanged);
617 }
618
619 PassRefPtr<PlatformCALayer> PlatformCALayerRemote::createCompatibleLayer(PlatformCALayer::LayerType layerType, PlatformCALayerClient* client) const
620 {
621     return PlatformCALayerRemote::create(layerType, client, m_context);
622 }
623
624 void PlatformCALayerRemote::enumerateRectsBeingDrawn(CGContextRef context, void (^block)(CGRect))
625 {
626     m_properties.backingStore->enumerateRectsBeingDrawn(context, block);
627 }
628
629 uint32_t PlatformCALayerRemote::hostingContextID()
630 {
631     ASSERT_NOT_REACHED();
632     return 0;
633 }
634
635 } // namespace WebKit