Changeset 111099 in webkit


Ignore:
Timestamp:
Mar 16, 2012 5:41:19 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Rename the existing WebPageCompositor class to WebPageCompositorPrivate
https://bugs.webkit.org/show_bug.cgi?id=81108
RIM PR: 136687

Patch by Arvid Nilsson <anilsson@rim.com> on 2012-03-16
Reviewed by Rob Buis.

This is done in anticipation of a new WebPageCompositor class in the
public API. The existing internal class will serve to d-pointerize the
new public API. In addition, it is and will be possible to create only
the private class, for cases where existing code paths require
OpenGL compositing (i.e. due to accelerated compositing layers being
added to the page).

Reviewed internally by Robin Cao.

  • Api/BackingStore.h:
  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPagePrivate::setIsAcceleratedCompositingActive):

  • Api/WebPageCompositor.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.cpp.

(BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
(BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
(BlackBerry::WebKit::WebPageCompositorPrivate::hardwareCompositing):
(BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
(BlackBerry::WebKit::WebPageCompositorPrivate::setBackingStoreUsesOpenGL):
(BlackBerry::WebKit::WebPageCompositorPrivate::commit):
(BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
(BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources):
(BlackBerry::WebKit::WebPageCompositorPrivate::animationTimerFired):

  • Api/WebPageCompositor_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.h.

(BlackBerry::WebKit::WebPageCompositorPrivate::layoutRectForCompositing):
(BlackBerry::WebKit::WebPageCompositorPrivate::setLayoutRectForCompositing):
(BlackBerry::WebKit::WebPageCompositorPrivate::contentsSizeForCompositing):
(BlackBerry::WebKit::WebPageCompositorPrivate::setContentsSizeForCompositing):
(BlackBerry::WebKit::WebPageCompositorPrivate::lastCompositingResults):
(BlackBerry::WebKit::WebPageCompositorPrivate::setLastCompositingResults):

  • Api/WebPage_p.h:
  • CMakeListsBlackBerry.txt:
Location:
trunk/Source/WebKit
Files:
5 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/PlatformBlackBerry.cmake

    r109698 r111099  
    4545    blackberry/Api/WebKitTextCodec.cpp
    4646    blackberry/Api/WebPage.cpp
     47    blackberry/Api/WebPageCompositor.cpp
    4748    blackberry/Api/WebPageGroupLoadDeferrer.cpp
    4849    blackberry/Api/WebSettings.cpp
     
    7879    blackberry/WebKitSupport/TouchEventHandler.cpp
    7980    blackberry/WebKitSupport/FatFingers.cpp
    80     blackberry/WebKitSupport/WebPageCompositor.cpp
    8181)
    8282
  • trunk/Source/WebKit/blackberry/Api/BackingStore.h

    r110712 r111099  
    4141class WebPage;
    4242class WebPagePrivate;
    43 class WebPageCompositor;
     43class WebPageCompositorPrivate;
    4444class BackingStorePrivate;
    4545class BackingStoreClient;
     
    8282    friend class BlackBerry::WebKit::WebPage;
    8383    friend class BlackBerry::WebKit::WebPagePrivate; // FIXME: For now, we expose our internals to WebPagePrivate. See PR #120301.
    84     friend class BlackBerry::WebKit::WebPageCompositor;
     84    friend class BlackBerry::WebKit::WebPageCompositorPrivate;
    8585    friend class WebCore::ChromeClientBlackBerry;
    8686    friend class WebCore::FrameLoaderClientBlackBerry;
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r111024 r111099  
    120120#if USE(ACCELERATED_COMPOSITING)
    121121#include "FrameLayers.h"
    122 #include "WebPageCompositor.h"
     122#include "WebPageCompositor_p.h"
    123123#endif
    124124
     
    53265326
    53275327    if (!m_compositor) {
    5328         m_compositor = adoptPtr(new WebPageCompositor(this));
     5328        m_compositor = adoptPtr(new WebPageCompositorPrivate(this));
    53295329        m_isAcceleratedCompositingActive = m_compositor->hardwareCompositing();
    53305330        if (!m_isAcceleratedCompositingActive)
  • trunk/Source/WebKit/blackberry/Api/WebPageCompositor.cpp

    r111098 r111099  
    2020
    2121#if USE(ACCELERATED_COMPOSITING)
    22 #include "WebPageCompositor.h"
     22#include "WebPageCompositor_p.h"
    2323
    2424#include "BackingStore_p.h"
     
    3737namespace WebKit {
    3838
    39 WebPageCompositor::WebPageCompositor(WebPagePrivate* page)
     39WebPageCompositorPrivate::WebPageCompositorPrivate(WebPagePrivate* page)
    4040    : m_webPage(page)
    4141    , m_context(GLES2Context::create(page))
     
    4444    , m_compositedGeneration(-1)
    4545    , m_backingStoreUsesOpenGL(false)
    46     , m_animationTimer(this, &WebPageCompositor::animationTimerFired)
     46    , m_animationTimer(this, &WebPageCompositorPrivate::animationTimerFired)
    4747    , m_timerClient(new Platform::GenericTimerClient(Platform::userInterfaceThreadTimerClient()))
    4848{
     
    5050}
    5151
    52 WebPageCompositor::~WebPageCompositor()
     52WebPageCompositorPrivate::~WebPageCompositorPrivate()
    5353{
    5454    m_animationTimer.stop();
     
    5656}
    5757
    58 bool WebPageCompositor::hardwareCompositing() const
     58bool WebPageCompositorPrivate::hardwareCompositing() const
    5959{
    6060    return m_layerRenderer->hardwareCompositing();
    6161}
    6262
    63 void WebPageCompositor::setRootLayer(LayerCompositingThread* rootLayer)
     63void WebPageCompositorPrivate::setRootLayer(LayerCompositingThread* rootLayer)
    6464{
    6565    m_rootLayer = rootLayer;
     
    6767}
    6868
    69 void WebPageCompositor::setBackingStoreUsesOpenGL(bool backingStoreUsesOpenGL)
     69void WebPageCompositorPrivate::setBackingStoreUsesOpenGL(bool backingStoreUsesOpenGL)
    7070{
    7171    m_backingStoreUsesOpenGL = backingStoreUsesOpenGL;
     
    7373}
    7474
    75 void WebPageCompositor::commit(LayerWebKitThread* rootLayer)
     75void WebPageCompositorPrivate::commit(LayerWebKitThread* rootLayer)
    7676{
    7777    if (!rootLayer)
     
    8282}
    8383
    84 bool WebPageCompositor::drawLayers(const IntRect& dstRect, const FloatRect& contents)
     84bool WebPageCompositorPrivate::drawLayers(const IntRect& dstRect, const FloatRect& contents)
    8585{
    8686    // Save a draw if we already drew this generation, for example due to a concurrent scroll operation.
     
    106106}
    107107
    108 void WebPageCompositor::releaseLayerResources()
     108void WebPageCompositorPrivate::releaseLayerResources()
    109109{
    110110    m_layerRenderer->releaseLayerResources();
    111111}
    112112
    113 void WebPageCompositor::animationTimerFired()
     113void WebPageCompositorPrivate::animationTimerFired()
    114114{
    115115    if (m_webPage->m_backingStore->d->shouldDirectRenderingToWindow()) {
  • trunk/Source/WebKit/blackberry/Api/WebPageCompositor_p.h

    r111098 r111099  
    1717 */
    1818
    19 #ifndef WebPageCompositor_h
    20 #define WebPageCompositor_h
     19#ifndef WebPageCompositor_p_h
     20#define WebPageCompositor_p_h
    2121
    2222#if USE(ACCELERATED_COMPOSITING)
     
    4040
    4141// This class may only be used on the compositing thread.
    42 class WebPageCompositor {
     42class WebPageCompositorPrivate {
    4343public:
    44     WebPageCompositor(WebPagePrivate*);
    45     ~WebPageCompositor();
     44    WebPageCompositorPrivate(WebPagePrivate*);
     45    ~WebPageCompositorPrivate();
    4646
    4747    bool hardwareCompositing() const;
     
    8282    WebCore::FloatRect m_compositedContentsRect;
    8383    bool m_backingStoreUsesOpenGL;
    84     BlackBerry::Platform::Timer<WebPageCompositor> m_animationTimer;
     84    BlackBerry::Platform::Timer<WebPageCompositorPrivate> m_animationTimer;
    8585    BlackBerry::Platform::TimerClient* m_timerClient;
    8686};
     
    9191#endif // USE(ACCELERATED_COMPOSITING)
    9292
    93 #endif // WebPageCompositor_h
     93#endif // WebPageCompositor_p_h
  • trunk/Source/WebKit/blackberry/Api/WebPage_p.h

    r111024 r111099  
    6666#if USE(ACCELERATED_COMPOSITING)
    6767class FrameLayers;
    68 class WebPageCompositor;
     68class WebPageCompositorPrivate;
    6969#endif
    7070
     
    500500    bool m_isAcceleratedCompositingActive;
    501501    OwnPtr<FrameLayers> m_frameLayers; // WebKit thread only.
    502     OwnPtr<WebPageCompositor> m_compositor; // Compositing thread only.
     502    OwnPtr<WebPageCompositorPrivate> m_compositor; // Compositing thread only.
    503503    OwnPtr<WebCore::Timer<WebPagePrivate> > m_rootLayerCommitTimer;
    504504    bool m_needsOneShotDrawingSynchronization;
  • trunk/Source/WebKit/blackberry/ChangeLog

    r111087 r111099  
     12012-03-16  Arvid Nilsson  <anilsson@rim.com>
     2
     3        [BlackBerry] Rename the existing WebPageCompositor class to WebPageCompositorPrivate
     4        https://bugs.webkit.org/show_bug.cgi?id=81108
     5        RIM PR: 136687
     6
     7        Reviewed by Rob Buis.
     8
     9        This is done in anticipation of a new WebPageCompositor class in the
     10        public API. The existing internal class will serve to d-pointerize the
     11        new public API. In addition, it is and will be possible to create only
     12        the private class, for cases where existing code paths require
     13        OpenGL compositing (i.e. due to accelerated compositing layers being
     14        added to the page).
     15
     16        Reviewed internally by Robin Cao.
     17
     18        * Api/BackingStore.h:
     19        * Api/WebPage.cpp:
     20        (BlackBerry::WebKit::WebPagePrivate::setIsAcceleratedCompositingActive):
     21        * Api/WebPageCompositor.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.cpp.
     22        (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
     23        (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
     24        (BlackBerry::WebKit::WebPageCompositorPrivate::hardwareCompositing):
     25        (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
     26        (BlackBerry::WebKit::WebPageCompositorPrivate::setBackingStoreUsesOpenGL):
     27        (BlackBerry::WebKit::WebPageCompositorPrivate::commit):
     28        (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
     29        (BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources):
     30        (BlackBerry::WebKit::WebPageCompositorPrivate::animationTimerFired):
     31        * Api/WebPageCompositor_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.h.
     32        (BlackBerry::WebKit::WebPageCompositorPrivate::layoutRectForCompositing):
     33        (BlackBerry::WebKit::WebPageCompositorPrivate::setLayoutRectForCompositing):
     34        (BlackBerry::WebKit::WebPageCompositorPrivate::contentsSizeForCompositing):
     35        (BlackBerry::WebKit::WebPageCompositorPrivate::setContentsSizeForCompositing):
     36        (BlackBerry::WebKit::WebPageCompositorPrivate::lastCompositingResults):
     37        (BlackBerry::WebKit::WebPageCompositorPrivate::setLastCompositingResults):
     38        * Api/WebPage_p.h:
     39        * CMakeListsBlackBerry.txt:
     40
    1412012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
    242
Note: See TracChangeset for help on using the changeset viewer.