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