Changeset 76077 in webkit


Ignore:
Timestamp:
Jan 18, 2011 3:40:46 PM (13 years ago)
Author:
andersca@apple.com
Message:

2011-01-18 Anders Carlsson <andersca@apple.com>

Reviewed by Dan Bernstein.

Pass the web page proxy to BackingStore::create
https://bugs.webkit.org/show_bug.cgi?id=52673

  • UIProcess/BackingStore.cpp: (WebKit::BackingStore::create): Add WebPageProxy parameter.


(WebKit::BackingStore::BackingStore):
Add WebPageProxy parameter.

  • UIProcess/BackingStore.h: Add WebPageProxy member variable.
  • UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Pass the web page proxy when creating the backing store.
  • UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::backingStoreContext): Set the default blend mode.
Location:
trunk/Source/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r76072 r76077  
     12011-01-18  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Pass the web page proxy to BackingStore::create
     6        https://bugs.webkit.org/show_bug.cgi?id=52673
     7
     8        * UIProcess/BackingStore.cpp:
     9        (WebKit::BackingStore::create):
     10        Add WebPageProxy parameter.
     11   
     12        (WebKit::BackingStore::BackingStore):
     13        Add WebPageProxy parameter.
     14
     15        * UIProcess/BackingStore.h:
     16        Add WebPageProxy member variable.
     17
     18        * UIProcess/DrawingAreaProxyImpl.cpp:
     19        (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
     20        Pass the web page proxy when creating the backing store.
     21
     22        * UIProcess/mac/BackingStoreMac.mm:
     23        (WebKit::BackingStore::backingStoreContext):
     24        Set the default blend mode.
     25
    1262011-01-18  Anders Carlsson  <andersca@apple.com>
    227
  • trunk/Source/WebKit2/UIProcess/BackingStore.cpp

    r75647 r76077  
    3434namespace WebKit {
    3535
    36 PassOwnPtr<BackingStore> BackingStore::create(const IntSize& size)
     36PassOwnPtr<BackingStore> BackingStore::create(const IntSize& size, WebPageProxy* webPageProxy)
    3737{
    38     return adoptPtr(new BackingStore(size));
     38    return adoptPtr(new BackingStore(size, webPageProxy));
    3939}
    4040
    41 BackingStore::BackingStore(const IntSize& size)
     41BackingStore::BackingStore(const IntSize& size, WebPageProxy* webPageProxy)
    4242    : m_size(size)
     43    , m_webPageProxy(webPageProxy)
    4344{
    4445    ASSERT(!m_size.isEmpty());
  • trunk/Source/WebKit2/UIProcess/BackingStore.h

    r76072 r76077  
    4848
    4949public:
    50     static PassOwnPtr<BackingStore> create(const WebCore::IntSize&);
     50    static PassOwnPtr<BackingStore> create(const WebCore::IntSize&, WebPageProxy*);
    5151    ~BackingStore();
    5252
     
    5959
    6060private:
    61     explicit BackingStore(const WebCore::IntSize&);
     61    BackingStore(const WebCore::IntSize&, WebPageProxy*);
    6262
    6363    void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
    6464
    6565    WebCore::IntSize m_size;
     66    WebPageProxy* m_webPageProxy;
    6667
    6768#if PLATFORM(MAC)
    6869    CGContextRef backingStoreContext();
    6970
     71    RetainPtr<CGLayerRef> m_cgLayer;
    7072    RetainPtr<CGContextRef> m_bitmapContext;
    7173#endif
  • trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp

    r76065 r76077  
    114114
    115115    if (!m_backingStore)
    116         m_backingStore = BackingStore::create(updateInfo.viewSize);
     116        m_backingStore = BackingStore::create(updateInfo.viewSize, m_webPageProxy);
    117117
    118118    m_backingStore->incorporateUpdate(updateInfo);
  • trunk/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm

    r76072 r76077  
    4848       
    4949        m_bitmapContext.adoptCF(CGBitmapContextCreate(0, m_size.width(), m_size.height(), 8, m_size.width() * 4, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
    50        
     50
     51        CGContextSetBlendMode(m_bitmapContext.get(), kCGBlendModeCopy);
     52
    5153        // We want the origin to be in the top left corner so flip the backing store context.
    5254        CGContextTranslateCTM(m_bitmapContext.get(), 0, m_size.height());
Note: See TracChangeset for help on using the changeset viewer.