Put a better version of the assertion back, and add one when we ensureBackingStore.
[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(!m_properties.backingStore || owner());
122     
123     if (m_properties.backingStore && (!owner() || !owner()->platformCALayerDrawsContent())) {
124         m_properties.backingStore = nullptr;
125         m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged);
126     }
127
128     if (m_properties.backingStore && m_properties.backingStore->display())
129         m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged);
130
131     if (m_properties.changedProperties != RemoteLayerTreeTransaction::NoChange) {
132         if (m_properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) {
133             m_properties.children.clear();
134             for (const auto& layer : m_children)
135                 m_properties.children.append(layer->layerID());
136         }
137
138         if (m_layerType == LayerTypeCustom) {
139             RemoteLayerTreePropertyApplier::applyProperties(platformLayer(), nullptr, m_properties, RemoteLayerTreePropertyApplier::RelatedLayerMap());
140             didCommit();
141             return;
142         }
143
144         transaction.layerPropertiesChanged(this, m_properties);
145     }
146
147     for (size_t i = 0; i < m_children.size(); ++i) {
148         PlatformCALayerRemote* child = toPlatformCALayerRemote(m_children[i].get());
149         ASSERT(child->superlayer() == this);
150         child->recursiveBuildTransaction(transaction);
151     }
152
153     if (m_maskLayer)
154         m_maskLayer->recursiveBuildTransaction(transaction);
155 }
156
157 void PlatformCALayerRemote::didCommit()
158 {
159     m_properties.addedAnimations.clear();
160     m_properties.keyPathsOfAnimationsToRemove.clear();
161     m_properties.resetChangedProperties();
162 }
163
164 void PlatformCALayerRemote::animationStarted(CFTimeInterval beginTime)
165 {
166     if (m_owner)
167         m_owner->platformCALayerAnimationStarted(beginTime);
168 }
169
170 void PlatformCALayerRemote::ensureBackingStore()
171 {
172     ASSERT(owner());
173     
174     if (!m_properties.backingStore)
175         m_properties.backingStore = std::make_unique<RemoteLayerBackingStore>(m_context);
176
177     updateBackingStore();
178 }
179
180 void PlatformCALayerRemote::updateBackingStore()
181 {
182     if (!m_properties.backingStore)
183         return;
184
185     m_properties.backingStore->ensureBackingStore(this, expandedIntSize(m_properties.bounds.size()), m_properties.contentsScale, m_acceleratesDrawing, m_properties.opaque);
186 }
187
188 void PlatformCALayerRemote::setNeedsDisplay(const FloatRect* rect)
189 {
190     ensureBackingStore();
191
192     if (!rect) {
193         m_properties.backingStore->setNeedsDisplay();
194         return;
195     }
196
197     // FIXME: Need to map this through contentsRect/etc.
198     m_properties.backingStore->setNeedsDisplay(enclosingIntRect(*rect));
199 }
200
201 void PlatformCALayerRemote::setContentsChanged()
202 {
203 }
204
205 PlatformCALayer* PlatformCALayerRemote::superlayer() const
206 {
207     return m_superlayer;
208 }
209
210 void PlatformCALayerRemote::removeFromSuperlayer()
211 {
212     if (!m_superlayer)
213         return;
214
215     m_superlayer->removeSublayer(this);
216 }
217
218 void PlatformCALayerRemote::removeSublayer(PlatformCALayerRemote* layer)
219 {
220     size_t childIndex = m_children.find(layer);
221     if (childIndex != notFound)
222         m_children.remove(childIndex);
223     layer->m_superlayer = nullptr;
224     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
225 }
226
227 void PlatformCALayerRemote::setSublayers(const PlatformCALayerList& list)
228 {
229     removeAllSublayers();
230     m_children = list;
231
232     for (const auto& layer : list) {
233         layer->removeFromSuperlayer();
234         toPlatformCALayerRemote(layer.get())->m_superlayer = this;
235     }
236
237     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
238 }
239
240 void PlatformCALayerRemote::removeAllSublayers()
241 {
242     PlatformCALayerList layersToRemove = m_children;
243     for (const auto& layer : layersToRemove)
244         layer->removeFromSuperlayer();
245     ASSERT(m_children.isEmpty());
246     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
247 }
248
249 void PlatformCALayerRemote::appendSublayer(PlatformCALayer* layer)
250 {
251     RefPtr<PlatformCALayer> layerProtector(layer);
252
253     layer->removeFromSuperlayer();
254     m_children.append(layer);
255     toPlatformCALayerRemote(layer)->m_superlayer = this;
256     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
257 }
258
259 void PlatformCALayerRemote::insertSublayer(PlatformCALayer* layer, size_t index)
260 {
261     RefPtr<PlatformCALayer> layerProtector(layer);
262
263     layer->removeFromSuperlayer();
264     m_children.insert(index, layer);
265     toPlatformCALayerRemote(layer)->m_superlayer = this;
266     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
267 }
268
269 void PlatformCALayerRemote::replaceSublayer(PlatformCALayer* reference, PlatformCALayer* layer)
270 {
271     ASSERT(reference->superlayer() == this);
272     RefPtr<PlatformCALayer> layerProtector(layer);
273
274     layer->removeFromSuperlayer();
275     size_t referenceIndex = m_children.find(reference);
276     if (referenceIndex != notFound) {
277         m_children[referenceIndex]->removeFromSuperlayer();
278         m_children.insert(referenceIndex, layer);
279         toPlatformCALayerRemote(layer)->m_superlayer = this;
280     }
281
282     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ChildrenChanged);
283 }
284
285 void PlatformCALayerRemote::adoptSublayers(PlatformCALayer* source)
286 {
287     PlatformCALayerList layersToMove = toPlatformCALayerRemote(source)->m_children;
288
289     if (const PlatformCALayerList* customLayers = source->customSublayers()) {
290         for (const auto& layer : *customLayers) {
291             size_t layerIndex = layersToMove.find(layer);
292             if (layerIndex != notFound)
293                 layersToMove.remove(layerIndex);
294         }
295     }
296
297     setSublayers(layersToMove);
298 }
299
300 void PlatformCALayerRemote::addAnimationForKey(const String& key, PlatformCAAnimation* animation)
301 {
302     m_properties.addedAnimations.set(key, toPlatformCAAnimationRemote(animation)->properties());
303     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnimationsChanged);
304
305     if (m_context)
306         m_context->willStartAnimationOnLayer(this);
307 }
308
309 void PlatformCALayerRemote::removeAnimationForKey(const String& key)
310 {
311     m_properties.addedAnimations.remove(key);
312     m_properties.keyPathsOfAnimationsToRemove.add(key);
313     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnimationsChanged);
314 }
315
316 PassRefPtr<PlatformCAAnimation> PlatformCALayerRemote::animationForKey(const String& key)
317 {
318     // FIXME: implement.
319     return nullptr;
320 }
321
322 void PlatformCALayerRemote::setMask(PlatformCALayer* layer)
323 {
324     if (layer) {
325         m_maskLayer = toPlatformCALayerRemote(layer);
326         m_properties.maskLayerID = m_maskLayer->layerID();
327     } else {
328         m_maskLayer = nullptr;
329         m_properties.maskLayerID = 0;
330     }
331
332     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::MaskLayerChanged);
333 }
334
335 bool PlatformCALayerRemote::isOpaque() const
336 {
337     return m_properties.opaque;
338 }
339
340 void PlatformCALayerRemote::setOpaque(bool value)
341 {
342     m_properties.opaque = value;
343     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::OpaqueChanged);
344
345     updateBackingStore();
346 }
347
348 FloatRect PlatformCALayerRemote::bounds() const
349 {
350     return m_properties.bounds;
351 }
352
353 void PlatformCALayerRemote::setBounds(const FloatRect& value)
354 {
355     if (value == m_properties.bounds)
356         return;
357
358     m_properties.bounds = value;
359     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BoundsChanged);
360     
361     if (requiresCustomAppearanceUpdateOnBoundsChange())
362         m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::CustomAppearanceChanged);
363
364     updateBackingStore();
365 }
366
367 FloatPoint3D PlatformCALayerRemote::position() const
368 {
369     return m_properties.position;
370 }
371
372 void PlatformCALayerRemote::setPosition(const FloatPoint3D& value)
373 {
374     if (value == m_properties.position)
375         return;
376
377     m_properties.position = value;
378     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::PositionChanged);
379 }
380
381 FloatPoint3D PlatformCALayerRemote::anchorPoint() const
382 {
383     return m_properties.anchorPoint;
384 }
385
386 void PlatformCALayerRemote::setAnchorPoint(const FloatPoint3D& value)
387 {
388     if (value == m_properties.anchorPoint)
389         return;
390
391     m_properties.anchorPoint = value;
392     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnchorPointChanged);
393 }
394
395 TransformationMatrix PlatformCALayerRemote::transform() const
396 {
397     return m_properties.transform ? *m_properties.transform : TransformationMatrix();
398 }
399
400 void PlatformCALayerRemote::setTransform(const TransformationMatrix& value)
401 {
402     m_properties.transform = std::make_unique<TransformationMatrix>(value);
403     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::TransformChanged);
404 }
405
406 TransformationMatrix PlatformCALayerRemote::sublayerTransform() const
407 {
408     return m_properties.sublayerTransform ? *m_properties.sublayerTransform : TransformationMatrix();
409 }
410
411 void PlatformCALayerRemote::setSublayerTransform(const TransformationMatrix& value)
412 {
413     m_properties.sublayerTransform = std::make_unique<TransformationMatrix>(value);
414     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::SublayerTransformChanged);
415 }
416
417 void PlatformCALayerRemote::setHidden(bool value)
418 {
419     m_properties.hidden = value;
420     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::HiddenChanged);
421 }
422
423 void PlatformCALayerRemote::setGeometryFlipped(bool value)
424 {
425     m_properties.geometryFlipped = value;
426     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::GeometryFlippedChanged);
427 }
428
429 bool PlatformCALayerRemote::isDoubleSided() const
430 {
431     return m_properties.doubleSided;
432 }
433
434 void PlatformCALayerRemote::setDoubleSided(bool value)
435 {
436     m_properties.doubleSided = value;
437     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::DoubleSidedChanged);
438 }
439
440 bool PlatformCALayerRemote::masksToBounds() const
441 {
442     return m_properties.masksToBounds;
443 }
444
445 void PlatformCALayerRemote::setMasksToBounds(bool value)
446 {
447     if (value == m_properties.masksToBounds)
448         return;
449
450     m_properties.masksToBounds = value;
451     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::MasksToBoundsChanged);
452 }
453
454 bool PlatformCALayerRemote::acceleratesDrawing() const
455 {
456     return m_acceleratesDrawing;
457 }
458
459 void PlatformCALayerRemote::setAcceleratesDrawing(bool acceleratesDrawing)
460 {
461     m_acceleratesDrawing = acceleratesDrawing;
462     updateBackingStore();
463 }
464
465 CFTypeRef PlatformCALayerRemote::contents() const
466 {
467     return nullptr;
468 }
469
470 void PlatformCALayerRemote::setContents(CFTypeRef value)
471 {
472 }
473
474 void PlatformCALayerRemote::setContentsRect(const FloatRect& value)
475 {
476     m_properties.contentsRect = value;
477     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ContentsRectChanged);
478 }
479
480 void PlatformCALayerRemote::setMinificationFilter(FilterType value)
481 {
482     m_properties.minificationFilter = value;
483     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::MinificationFilterChanged);
484 }
485
486 void PlatformCALayerRemote::setMagnificationFilter(FilterType value)
487 {
488     m_properties.magnificationFilter = value;
489     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::MagnificationFilterChanged);
490 }
491
492 Color PlatformCALayerRemote::backgroundColor() const
493 {
494     return m_properties.backgroundColor;
495 }
496
497 void PlatformCALayerRemote::setBackgroundColor(const Color& value)
498 {
499     m_properties.backgroundColor = value;
500     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackgroundColorChanged);
501 }
502
503 void PlatformCALayerRemote::setBorderWidth(float value)
504 {
505     if (value == m_properties.borderWidth)
506         return;
507
508     m_properties.borderWidth = value;
509     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BorderWidthChanged);
510 }
511
512 void PlatformCALayerRemote::setBorderColor(const Color& value)
513 {
514     if (value == m_properties.borderColor)
515         return;
516
517     m_properties.borderColor = value;
518     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BorderColorChanged);
519 }
520
521 float PlatformCALayerRemote::opacity() const
522 {
523     return m_properties.opacity;
524 }
525
526 void PlatformCALayerRemote::setOpacity(float value)
527 {
528     m_properties.opacity = value;
529     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::OpacityChanged);
530 }
531
532 #if ENABLE(CSS_FILTERS)
533 void PlatformCALayerRemote::setFilters(const FilterOperations& filters)
534 {
535     m_properties.filters = std::make_unique<FilterOperations>(filters);
536     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::FiltersChanged);
537 }
538
539 void PlatformCALayerRemote::copyFiltersFrom(const PlatformCALayer* sourceLayer)
540 {
541     ASSERT_NOT_REACHED();
542 }
543
544 #if ENABLE(CSS_COMPOSITING)
545 void PlatformCALayerRemote::setBlendMode(BlendMode blendMode)
546 {
547     m_properties.blendMode = blendMode;
548     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BlendModeChanged);
549 }
550 #endif
551
552 bool PlatformCALayerRemote::filtersCanBeComposited(const FilterOperations& filters)
553 {
554     return PlatformCALayerMac::filtersCanBeComposited(filters);
555 }
556 #endif
557
558 void PlatformCALayerRemote::setName(const String& value)
559 {
560     m_properties.name = value;
561     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::NameChanged);
562 }
563
564 void PlatformCALayerRemote::setSpeed(float value)
565 {
566     m_properties.speed = value;
567     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::SpeedChanged);
568 }
569
570 void PlatformCALayerRemote::setTimeOffset(CFTimeInterval value)
571 {
572     m_properties.timeOffset = value;
573     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::TimeOffsetChanged);
574 }
575
576 float PlatformCALayerRemote::contentsScale() const
577 {
578     return m_properties.contentsScale;
579 }
580
581 void PlatformCALayerRemote::setContentsScale(float value)
582 {
583     m_properties.contentsScale = value;
584     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ContentsScaleChanged);
585
586     updateBackingStore();
587 }
588
589 void PlatformCALayerRemote::setEdgeAntialiasingMask(unsigned value)
590 {
591     m_properties.edgeAntialiasingMask = value;
592     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::EdgeAntialiasingMaskChanged);
593 }
594
595 bool PlatformCALayerRemote::requiresCustomAppearanceUpdateOnBoundsChange() const
596 {
597     return m_properties.customAppearance == GraphicsLayer::ScrollingShadow;
598 }
599
600 GraphicsLayer::CustomAppearance PlatformCALayerRemote::customAppearance() const
601 {
602     return m_properties.customAppearance;
603 }
604
605 void PlatformCALayerRemote::updateCustomAppearance(GraphicsLayer::CustomAppearance customAppearance)
606 {
607     m_properties.customAppearance = customAppearance;
608     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::CustomAppearanceChanged);
609 }
610
611 GraphicsLayer::CustomBehavior PlatformCALayerRemote::customBehavior() const
612 {
613     return m_properties.customBehavior;
614 }
615
616 void PlatformCALayerRemote::updateCustomBehavior(GraphicsLayer::CustomBehavior customBehavior)
617 {
618     m_properties.customBehavior = customBehavior;
619     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::CustomBehaviorChanged);
620 }
621
622 PassRefPtr<PlatformCALayer> PlatformCALayerRemote::createCompatibleLayer(PlatformCALayer::LayerType layerType, PlatformCALayerClient* client) const
623 {
624     return PlatformCALayerRemote::create(layerType, client, m_context);
625 }
626
627 void PlatformCALayerRemote::enumerateRectsBeingDrawn(CGContextRef context, void (^block)(CGRect))
628 {
629     m_properties.backingStore->enumerateRectsBeingDrawn(context, block);
630 }
631
632 uint32_t PlatformCALayerRemote::hostingContextID()
633 {
634     ASSERT_NOT_REACHED();
635     return 0;
636 }
637
638 } // namespace WebKit