Final part of "sync" to "flush" renaming
[WebKit-https.git] / Source / WebKit / blackberry / Api / WebOverlay.cpp
1 /*
2  * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17  */
18
19 #include "config.h"
20
21 #include "WebOverlay.h"
22
23 #if USE(ACCELERATED_COMPOSITING)
24
25 #include "LayerWebKitThread.h"
26 #include "NotImplemented.h"
27 #include "PlatformContextSkia.h"
28 #include "TextureCacheCompositingThread.h"
29 #include "WebAnimation.h"
30 #include "WebAnimation_p.h"
31 #include "WebOverlayClient.h"
32 #include "WebOverlayOverride.h"
33 #include "WebOverlay_p.h"
34 #include "WebPageCompositorClient.h"
35 #include "WebPageCompositor_p.h"
36 #include "WebPage_p.h"
37 #include "WebString.h"
38
39 #include <BlackBerryPlatformMessageClient.h>
40 #include <GLES2/gl2.h>
41 #include <SkDevice.h>
42
43 namespace BlackBerry {
44 namespace WebKit {
45
46 using namespace WebCore;
47
48 WebOverlay::WebOverlay()
49     : d(0)
50 {
51     if (Platform::webKitThreadMessageClient()->isCurrentThread()) {
52         d = new WebOverlayPrivateWebKitThread;
53         d->q = this;
54     } else if (Platform::userInterfaceThreadMessageClient()->isCurrentThread()) {
55         d = new WebOverlayPrivateCompositingThread;
56         d->q = this;
57     }
58 }
59
60 WebOverlay::WebOverlay(GraphicsLayerClient* client)
61     : d(0)
62 {
63     d = new WebOverlayPrivateWebKitThread(client);
64     d->q = this;
65 }
66
67 WebOverlay::~WebOverlay()
68 {
69     delete d;
70 }
71
72 Platform::FloatPoint WebOverlay::position() const
73 {
74     return d->position();
75 }
76
77 void WebOverlay::setPosition(const Platform::FloatPoint& position)
78 {
79     d->setPosition(position);
80 }
81
82 Platform::FloatPoint WebOverlay::anchorPoint() const
83 {
84     return d->anchorPoint();
85 }
86
87 void WebOverlay::setAnchorPoint(const Platform::FloatPoint& anchor)
88 {
89     d->setAnchorPoint(anchor);
90 }
91
92 Platform::FloatSize WebOverlay::size() const
93 {
94     return d->size();
95 }
96
97 void WebOverlay::setSize(const Platform::FloatSize& size)
98 {
99     d->setSize(size);
100 }
101
102 bool WebOverlay::sizeIsScaleInvariant() const
103 {
104     return d->sizeIsScaleInvariant();
105 }
106
107 void WebOverlay::setSizeIsScaleInvariant(bool invariant)
108 {
109     d->setSizeIsScaleInvariant(invariant);
110 }
111
112 Platform::TransformationMatrix WebOverlay::transform() const
113 {
114     // FIXME: There is no WebCore::TranformationMatrix interoperability
115     // with Platform::TransformationMatrix
116     TransformationMatrix transform = d->transform();
117     return reinterpret_cast<const Platform::TransformationMatrix&>(transform);
118 }
119
120 void WebOverlay::setTransform(const Platform::TransformationMatrix& transform)
121 {
122     d->setTransform(reinterpret_cast<const TransformationMatrix&>(transform));
123 }
124
125 float WebOverlay::opacity() const
126 {
127     return d->opacity();
128 }
129
130 void WebOverlay::setOpacity(float opacity)
131 {
132     d->setOpacity(opacity);
133 }
134
135 void WebOverlay::addAnimation(const WebAnimation& animation)
136 {
137     d->addAnimation(animation.d->name, animation.d->animation.get(), animation.d->keyframes);
138 }
139
140 void WebOverlay::removeAnimation(const WebString& name)
141 {
142     d->removeAnimation(String(PassRefPtr<StringImpl>(name.impl())));
143 }
144
145 WebOverlay* WebOverlay::parent() const
146 {
147     return d->parent;
148 }
149
150 bool WebOverlay::addChild(WebOverlay* overlay)
151 {
152     if (overlay->d->nativeThread != d->nativeThread)
153         return false;
154
155     overlay->d->parent = this;
156     d->addChild(overlay->d);
157     return true;
158 }
159
160 void WebOverlay::removeFromParent()
161 {
162     d->removeFromParent();
163     d->parent = 0;
164 }
165
166 void WebOverlay::setContentsToImage(const unsigned char* data, const Platform::IntSize& imageSize, ImageDataAdoptionType adoptionType)
167 {
168     d->setContentsToImage(data, imageSize, adoptionType);
169 }
170
171 void WebOverlay::setContentsToColor(int r, int g, int b, int a)
172 {
173     d->setContentsToColor(Color(r, g, b, a));
174 }
175
176 void WebOverlay::setDrawsContent(bool drawsContent)
177 {
178     d->setDrawsContent(drawsContent);
179 }
180
181 void WebOverlay::invalidate()
182 {
183     d->invalidate();
184 }
185
186 void WebOverlay::setClient(WebOverlayClient* client)
187 {
188     d->setClient(client);
189 }
190
191 WebOverlayOverride* WebOverlay::override()
192 {
193     // Must be called on UI thread
194     if (!Platform::userInterfaceThreadMessageClient()->isCurrentThread())
195         return 0;
196
197     return d->override();
198 }
199
200 void WebOverlay::resetOverrides()
201 {
202     d->resetOverrides();
203 }
204
205 WebPagePrivate* WebOverlayPrivate::page() const
206 {
207     if (m_page)
208         return m_page;
209
210     if (parent)
211         return parent->d->page();
212
213     return 0;
214 }
215
216 WebOverlayOverride* WebOverlayPrivate::override()
217 {
218     if (!m_override)
219         m_override = adoptPtr(new WebOverlayOverride(this));
220
221     // Page might have changed if we were removed from the page and added to
222     // some other page.
223     m_override->d->setPage(page());
224
225     return m_override.get();
226 }
227
228 void WebOverlayPrivate::drawContents(SkCanvas* canvas)
229 {
230     if (!client)
231         return;
232
233     client->drawOverlayContents(q, canvas);
234 }
235
236 void WebOverlayPrivate::scheduleCompositingRun()
237 {
238     if (!page())
239         return;
240
241     page()->scheduleCompositingRun();
242 }
243
244 WebOverlayPrivateWebKitThread::WebOverlayPrivateWebKitThread(GraphicsLayerClient* client)
245     : m_layer(GraphicsLayer::create(client ? client : this))
246 {
247     m_layerCompositingThread = m_layer->platformLayer()->layerCompositingThread();
248 }
249
250 FloatPoint WebOverlayPrivateWebKitThread::position() const
251 {
252     return m_layer->position();
253 }
254
255 void WebOverlayPrivateWebKitThread::setPosition(const FloatPoint& position)
256 {
257     m_layer->setPosition(position);
258 }
259
260 FloatPoint WebOverlayPrivateWebKitThread::anchorPoint() const
261 {
262     FloatPoint3D anchor = m_layer->anchorPoint();
263     return FloatPoint(anchor.x(), anchor.y());
264 }
265
266 void WebOverlayPrivateWebKitThread::setAnchorPoint(const FloatPoint& anchor)
267 {
268     m_layer->setAnchorPoint(FloatPoint3D(anchor.x(), anchor.y(), 0));
269 }
270
271 FloatSize WebOverlayPrivateWebKitThread::size() const
272 {
273     return m_layer->size();
274 }
275
276 void WebOverlayPrivateWebKitThread::setSize(const FloatSize& size)
277 {
278     m_layer->setSize(size);
279 }
280
281 bool WebOverlayPrivateWebKitThread::sizeIsScaleInvariant() const
282 {
283     return m_layer->platformLayer()->sizeIsScaleInvariant();
284 }
285
286 void WebOverlayPrivateWebKitThread::setSizeIsScaleInvariant(bool invariant)
287 {
288     m_layer->platformLayer()->setSizeIsScaleInvariant(invariant);
289 }
290
291 TransformationMatrix WebOverlayPrivateWebKitThread::transform() const
292 {
293     return m_layer->transform();
294 }
295
296 void WebOverlayPrivateWebKitThread::setTransform(const TransformationMatrix& transform)
297 {
298     m_layer->setTransform(transform);
299 }
300
301 float WebOverlayPrivateWebKitThread::opacity() const
302 {
303     return m_layer->opacity();
304 }
305
306 void WebOverlayPrivateWebKitThread::setOpacity(float opacity)
307 {
308     m_layer->setOpacity(opacity);
309 }
310
311 void WebOverlayPrivateWebKitThread::addAnimation(const String& name, Animation* animation, const KeyframeValueList& keyframes)
312 {
313     IntSize size(m_layer->size().width(), m_layer->size().height());
314     m_layer->addAnimation(keyframes, size, animation, name, 0);
315 }
316
317 void WebOverlayPrivateWebKitThread::removeAnimation(const String& name)
318 {
319     m_layer->removeAnimation(name);
320 }
321
322 void WebOverlayPrivateWebKitThread::addChild(WebOverlayPrivate* overlay)
323 {
324     m_layer->addChild(static_cast<WebOverlayPrivateWebKitThread*>(overlay)->m_layer.get());
325 }
326
327 void WebOverlayPrivateWebKitThread::removeFromParent()
328 {
329     m_layer->removeFromParent();
330 }
331
332 void WebOverlayPrivateWebKitThread::setContentsToImage(const unsigned char* data, const WebCore::IntSize& imageSize, WebOverlay::ImageDataAdoptionType adoptionType)
333 {
334     notImplemented();
335 }
336
337 void WebOverlayPrivateWebKitThread::setContentsToColor(const Color&)
338 {
339     notImplemented();
340 }
341
342 void WebOverlayPrivateWebKitThread::setDrawsContent(bool drawsContent)
343 {
344     m_layer->setDrawsContent(drawsContent);
345 }
346
347 void WebOverlayPrivateWebKitThread::clear()
348 {
349     setSize(FloatSize(0, 0));
350 }
351
352 void WebOverlayPrivateWebKitThread::invalidate()
353 {
354     m_layer->setNeedsDisplay();
355 }
356
357 void WebOverlayPrivateWebKitThread::resetOverrides()
358 {
359     if (Platform::webKitThreadMessageClient()->isCurrentThread())
360         m_layer->platformLayer()->clearOverride();
361     else if (Platform::userInterfaceThreadMessageClient()->isCurrentThread()) {
362         m_layerCompositingThread->clearOverride();
363         scheduleCompositingRun();
364     }
365 }
366
367 void WebOverlayPrivateWebKitThread::notifyFlushRequired(const WebCore::GraphicsLayer*)
368 {
369     if (WebPagePrivate* page = this->page())
370         page->scheduleRootLayerCommit();
371 }
372
373 void WebOverlayPrivateWebKitThread::paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext& c, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect&)
374 {
375     drawContents(c.platformContext()->canvas());
376 }
377
378 WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient()
379     : m_drawsContent(false)
380     , m_layerCompositingThread(0)
381     , m_client(0)
382 {
383 }
384
385 void WebOverlayLayerCompositingThreadClient::setDrawsContent(bool drawsContent)
386 {
387     m_drawsContent = drawsContent;
388 }
389
390 void WebOverlayLayerCompositingThreadClient::invalidate()
391 {
392     m_texture.clear();
393     clearUploadedContents();
394 }
395
396 void WebOverlayLayerCompositingThreadClient::setContents(const SkBitmap& contents)
397 {
398     m_contents = contents;
399     m_color = Color();
400     m_texture.clear();
401     clearUploadedContents();
402 }
403
404 void WebOverlayLayerCompositingThreadClient::clearUploadedContents()
405 {
406     m_uploadedContents = SkBitmap();
407 }
408
409 void WebOverlayLayerCompositingThreadClient::setContentsToColor(const Color& color)
410 {
411     m_contents = SkBitmap();
412     m_color = color;
413     m_texture.clear();
414     clearUploadedContents();
415 }
416
417 void WebOverlayLayerCompositingThreadClient::layerCompositingThreadDestroyed(WebCore::LayerCompositingThread*)
418 {
419     delete this;
420 }
421
422 void WebOverlayLayerCompositingThreadClient::layerVisibilityChanged(LayerCompositingThread*, bool visible)
423 {
424 }
425
426 void WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded(LayerCompositingThread*)
427 {
428     if (m_contents.isNull() && !m_color.isValid() && !m_drawsContent)
429         return;
430
431     if (m_texture && m_texture->textureId())
432         return;
433
434     if (m_color.isValid()) {
435         m_texture = textureCacheCompositingThread()->textureForColor(m_color);
436         return;
437     }
438
439     if (m_drawsContent) {
440         if (!m_client || !m_owner)
441             return;
442
443         if (m_contents.isNull()) {
444             m_contents.setConfig(SkBitmap::kARGB_8888_Config, m_layerCompositingThread->bounds().width(), m_layerCompositingThread->bounds().height());
445             m_contents.allocPixels();
446         }
447
448         SkDevice device(m_contents);
449         SkCanvas canvas(&device);
450         m_client->drawOverlayContents(m_owner, &canvas);
451         canvas.flush();
452     }
453
454     m_texture = Texture::create();
455     m_texture->protect(IntSize(m_contents.width(), m_contents.height()));
456     IntRect bitmapRect(0, 0, m_contents.width(), m_contents.height());
457     m_uploadedContents = m_contents;
458     m_texture->updateContents(m_uploadedContents, bitmapRect, bitmapRect, false);
459 }
460
461 void WebOverlayLayerCompositingThreadClient::drawTextures(LayerCompositingThread* layer, double /*scale*/, int positionLocation, int texCoordLocation)
462 {
463     if (!m_texture || !m_texture->textureId())
464         return;
465
466     glBindTexture(GL_TEXTURE_2D, m_texture->textureId());
467     glVertexAttribPointer(positionLocation, 2, GL_FLOAT, GL_FALSE, 0, &layer->getTransformedBounds());
468     float texcoords[4 * 2] = { 0, 0,  0, 1,  1, 1,  1, 0 };
469     glVertexAttribPointer(texCoordLocation, 2, GL_FLOAT, GL_FALSE, 0, texcoords);
470     glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
471 }
472
473 void WebOverlayLayerCompositingThreadClient::deleteTextures(LayerCompositingThread*)
474 {
475     m_texture.clear();
476     clearUploadedContents();
477 }
478
479 WebOverlayPrivateCompositingThread::WebOverlayPrivateCompositingThread(PassRefPtr<LayerCompositingThread> layerCompositingThread)
480     : m_layerCompositingThreadClient(0)
481 {
482     m_layerCompositingThread = layerCompositingThread;
483 }
484
485 WebOverlayPrivateCompositingThread::WebOverlayPrivateCompositingThread()
486     : m_layerCompositingThreadClient(new WebOverlayLayerCompositingThreadClient)
487 {
488     m_layerCompositingThread = LayerCompositingThread::create(LayerData::CustomLayer, m_layerCompositingThreadClient);
489     m_layerCompositingThreadClient->setLayer(m_layerCompositingThread.get());
490 }
491
492 WebOverlayPrivateCompositingThread::~WebOverlayPrivateCompositingThread()
493 {
494     if (m_layerCompositingThreadClient)
495         m_layerCompositingThreadClient->setClient(0, 0);
496 }
497
498 void WebOverlayPrivateCompositingThread::setClient(WebOverlayClient* client)
499 {
500     WebOverlayPrivate::setClient(client);
501     if (m_layerCompositingThreadClient)
502         m_layerCompositingThreadClient->setClient(q, client);
503 }
504
505 FloatPoint WebOverlayPrivateCompositingThread::position() const
506 {
507     return m_layerCompositingThread->position();
508 }
509
510 void WebOverlayPrivateCompositingThread::setPosition(const FloatPoint& position)
511 {
512     m_layerCompositingThread->setPosition(position);
513     scheduleCompositingRun();
514 }
515
516 FloatPoint WebOverlayPrivateCompositingThread::anchorPoint() const
517 {
518     return m_layerCompositingThread->anchorPoint();
519 }
520
521 void WebOverlayPrivateCompositingThread::setAnchorPoint(const FloatPoint& anchor)
522 {
523     m_layerCompositingThread->setAnchorPoint(anchor);
524     scheduleCompositingRun();
525 }
526
527 FloatSize WebOverlayPrivateCompositingThread::size() const
528 {
529     IntSize bounds = m_layerCompositingThread->bounds();
530     return FloatSize(bounds.width(), bounds.height());
531 }
532
533 void WebOverlayPrivateCompositingThread::setSize(const FloatSize& size)
534 {
535     m_layerCompositingThread->setBounds(IntSize(size.width(), size.height()));
536     scheduleCompositingRun();
537 }
538
539 bool WebOverlayPrivateCompositingThread::sizeIsScaleInvariant() const
540 {
541     return m_layerCompositingThread->sizeIsScaleInvariant();
542 }
543
544 void WebOverlayPrivateCompositingThread::setSizeIsScaleInvariant(bool invariant)
545 {
546     m_layerCompositingThread->setSizeIsScaleInvariant(invariant);
547     scheduleCompositingRun();
548 }
549
550 TransformationMatrix WebOverlayPrivateCompositingThread::transform() const
551 {
552     return m_layerCompositingThread->transform();
553 }
554
555 void WebOverlayPrivateCompositingThread::setTransform(const TransformationMatrix& transform)
556 {
557     m_layerCompositingThread->setTransform(transform);
558     scheduleCompositingRun();
559 }
560
561 float WebOverlayPrivateCompositingThread::opacity() const
562 {
563     return m_layerCompositingThread->opacity();
564 }
565
566 void WebOverlayPrivateCompositingThread::setOpacity(float opacity)
567 {
568     m_layerCompositingThread->setOpacity(opacity);
569     scheduleCompositingRun();
570 }
571
572 void WebOverlayPrivateCompositingThread::addAnimation(const String& name, Animation* animation, const KeyframeValueList& keyframes)
573 {
574     IntSize boxSize = m_layerCompositingThread->bounds();
575     RefPtr<LayerAnimation> layerAnimation = LayerAnimation::create(keyframes, boxSize, animation, name, 0.0);
576
577     // FIXME: Unfortunately WebPageCompositorClient::requestAnimationFrame uses a different time coordinate system
578     // than accelerated animations, so we can't use the time returned by WebPageCompositorClient::requestAnimationFrame()
579     // for starttime.
580     layerAnimation->setStartTime(currentTime());
581
582     m_layerCompositingThread->addAnimation(layerAnimation.get());
583     scheduleCompositingRun();
584 }
585
586 void WebOverlayPrivateCompositingThread::removeAnimation(const String& name)
587 {
588     m_layerCompositingThread->removeAnimation(name);
589     scheduleCompositingRun();
590 }
591
592 void WebOverlayPrivateCompositingThread::addChild(WebOverlayPrivate* overlay)
593 {
594     m_layerCompositingThread->addSublayer(overlay->layerCompositingThread());
595     scheduleCompositingRun();
596 }
597
598 void WebOverlayPrivateCompositingThread::removeFromParent()
599 {
600     if (m_layerCompositingThread->superlayer() == page()->m_compositor->compositingThreadOverlayLayer())
601         page()->m_compositor->removeOverlay(m_layerCompositingThread.get());
602     else
603         m_layerCompositingThread->removeFromSuperlayer();
604     scheduleCompositingRun();
605 }
606
607 void WebOverlayPrivateCompositingThread::setContentsToImage(const unsigned char* data, const IntSize& imageSize, WebOverlay::ImageDataAdoptionType adoptionType)
608 {
609     if (!m_layerCompositingThreadClient)
610         return;
611
612     const SkBitmap& oldContents = m_layerCompositingThreadClient->contents();
613     if (!oldContents.isNull()) {
614         SkAutoLockPixels lock(oldContents);
615         if (data == oldContents.getPixels())
616             return;
617     }
618
619     SkBitmap contents;
620     contents.setConfig(SkBitmap::kARGB_8888_Config, imageSize.width(), imageSize.height());
621
622     switch (adoptionType) {
623     case WebOverlay::ReferenceImageData:
624         contents.setPixels(const_cast<unsigned char*>(data));
625         break;
626     case WebOverlay::CopyImageData:
627         if (contents.allocPixels()) {
628             contents.lockPixels();
629             size_t bytes = SkBitmap::ComputeSize(SkBitmap::kARGB_8888_Config, imageSize.width(), imageSize.height());
630             memcpy(contents.getPixels(), data, bytes);
631             contents.unlockPixels();
632         }
633         break;
634     default:
635         ASSERT_NOT_REACHED();
636     }
637
638     m_layerCompositingThreadClient->setContents(contents);
639     m_layerCompositingThread->setNeedsTexture(true);
640 }
641
642 void WebOverlayPrivateCompositingThread::setContentsToColor(const Color& color)
643 {
644     if (!m_layerCompositingThreadClient)
645         return;
646
647     m_layerCompositingThreadClient->setContentsToColor(color);
648     m_layerCompositingThread->setNeedsTexture(true);
649 }
650
651 void WebOverlayPrivateCompositingThread::setDrawsContent(bool drawsContent)
652 {
653     if (!m_layerCompositingThreadClient)
654         return;
655
656     m_layerCompositingThreadClient->setDrawsContent(drawsContent);
657     m_layerCompositingThread->setNeedsTexture(true);
658 }
659
660 void WebOverlayPrivateCompositingThread::clear()
661 {
662     m_layerCompositingThread->deleteTextures();
663 }
664
665 void WebOverlayPrivateCompositingThread::invalidate()
666 {
667     if (!m_layerCompositingThreadClient || !m_layerCompositingThreadClient->drawsContent())
668         return;
669
670     m_layerCompositingThreadClient->invalidate();
671     scheduleCompositingRun();
672 }
673
674 void WebOverlayPrivateCompositingThread::resetOverrides()
675 {
676     m_layerCompositingThread->clearOverride();
677     scheduleCompositingRun();
678 }
679
680 }
681 }
682 #else // USE(ACCELERATED_COMPOSITING)
683 namespace BlackBerry {
684 namespace WebKit {
685
686 WebOverlay::WebOverlay()
687 {
688 }
689
690 WebOverlay::~WebOverlay()
691 {
692 }
693
694 Platform::FloatPoint WebOverlay::position() const
695 {
696     return Platform::FloatPoint();
697 }
698
699 void WebOverlay::setPosition(const Platform::FloatPoint&)
700 {
701 }
702
703 Platform::FloatPoint WebOverlay::anchorPoint() const
704 {
705     return Platform::FloatPoint();
706 }
707
708 void WebOverlay::setAnchorPoint(const Platform::FloatPoint&)
709 {
710 }
711
712 Platform::FloatSize WebOverlay::size() const
713 {
714     return Platform::FloatSize();
715 }
716
717 void WebOverlay::setSize(const Platform::FloatSize&)
718 {
719 }
720
721 Platform::TransformationMatrix WebOverlay::transform() const
722 {
723     return Platform::TransformationMatrix();
724 }
725
726 void WebOverlay::setTransform(const Platform::TransformationMatrix&)
727 {
728 }
729
730 float WebOverlay::opacity() const
731 {
732     return 1.0f;
733 }
734
735 void WebOverlay::setOpacity(float)
736 {
737 }
738
739 WebOverlay* WebOverlay::parent() const
740 {
741     return 0;
742 }
743
744 bool WebOverlay::addChild(WebOverlay*)
745 {
746     return false;
747 }
748
749 void WebOverlay::removeFromParent()
750 {
751 }
752
753 void WebOverlay::addAnimation(const WebAnimation&)
754 {
755 }
756
757 void WebOverlay::removeAnimation(const WebString&)
758 {
759 }
760
761 void WebOverlay::setContentsToImage(const unsigned char*, const Platform::IntSize&, ImageDataAdoptionType)
762 {
763 }
764
765 void WebOverlay::setContentsToColor(int, int, int, int)
766 {
767 }
768
769 void WebOverlay::setDrawsContent(bool)
770 {
771 }
772
773 void WebOverlay::invalidate()
774 {
775 }
776
777 void WebOverlay::setClient(WebOverlayClient*)
778 {
779 }
780
781 WebOverlayOverride* WebOverlay::override()
782 {
783 }
784
785 void WebOverlay::resetOverrides()
786 {
787 }
788
789 }
790 }
791 #endif // USE(ACCELERATED_COMPOSITING)