Changeset 76393 in webkit


Ignore:
Timestamp:
Jan 21, 2011 2:09:19 PM (13 years ago)
Author:
andersca@apple.com
Message:

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

Reviewed by Dan Bernstein.

DrawingAreaProxyImpl::paint should return the unpainted region
https://bugs.webkit.org/show_bug.cgi?id=52918

  • UIProcess/API/mac/WKView.mm: (-[WKView drawRect:]): Add unpaintedRegion parameter.
  • UIProcess/BackingStore.h: (WebKit::BackingStore::size): Add a size getter.
  • UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::paint): Initialize the unpainted region to the dirty region, then subtract the painted region.
Location:
trunk/Source/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r76391 r76393  
     12011-01-21  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        DrawingAreaProxyImpl::paint should return the unpainted region
     6        https://bugs.webkit.org/show_bug.cgi?id=52918
     7
     8        * UIProcess/API/mac/WKView.mm:
     9        (-[WKView drawRect:]):
     10        Add unpaintedRegion parameter.
     11
     12        * UIProcess/BackingStore.h:
     13        (WebKit::BackingStore::size):
     14        Add a size getter.
     15
     16        * UIProcess/DrawingAreaProxyImpl.cpp:
     17        (WebKit::DrawingAreaProxyImpl::paint):
     18        Initialize the unpainted region to the dirty region, then subtract the painted region.
     19
    1202011-01-21  Anders Carlsson  <andersca@apple.com>
    221
  • trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm

    r76186 r76393  
    3838#import "PasteboardTypes.h"
    3939#import "PrintInfo.h"
     40#import "Region.h"
    4041#import "RunLoop.h"
    4142#import "TextChecker.h"
     
    12751276            [self getRectsBeingDrawn:&rectsBeingDrawn count:&numRectsBeingDrawn];
    12761277            for (NSInteger i = 0; i < numRectsBeingDrawn; ++i) {
     1278                Region unpaintedRegion;
    12771279                IntRect rect = enclosingIntRect(rectsBeingDrawn[i]);
    1278                 drawingArea->paint(context, rect);
     1280                drawingArea->paint(context, rect, unpaintedRegion);
    12791281            }
    12801282        } else if (_data->_page->drawsBackground()) {
  • trunk/Source/WebKit2/UIProcess/BackingStore.h

    r76305 r76393  
    5252    ~BackingStore();
    5353
     54    const WebCore::IntSize& size() const { return m_size; }
     55
    5456#if PLATFORM(MAC)
    5557    typedef CGContextRef PlatformGraphicsContext;
  • trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp

    r76179 r76393  
    2727
    2828#include "DrawingAreaMessages.h"
     29#include "Region.h"
    2930#include "UpdateInfo.h"
    3031#include "WebPageProxy.h"
     
    5455}
    5556
    56 void DrawingAreaProxyImpl::paint(BackingStore::PlatformGraphicsContext context, const IntRect& rect)
     57void DrawingAreaProxyImpl::paint(BackingStore::PlatformGraphicsContext context, const IntRect& rect, Region& unpaintedRegion)
    5758{
     59    unpaintedRegion = rect;
     60
    5861    if (!m_backingStore)
    5962        return;
    6063
    6164    m_backingStore->paint(context, rect);
     65    unpaintedRegion.subtract(IntRect(IntPoint(), m_backingStore->size()));
    6266}
    6367
  • trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h

    r76157 r76393  
    3232namespace WebKit {
    3333
     34class Region;
     35
    3436class DrawingAreaProxyImpl : public DrawingAreaProxy {
    3537public:
     
    3739    virtual ~DrawingAreaProxyImpl();
    3840
    39     void paint(BackingStore::PlatformGraphicsContext, const WebCore::IntRect&);
     41    void paint(BackingStore::PlatformGraphicsContext, const WebCore::IntRect&, Region& unpaintedRegion);
    4042
    4143private:
Note: See TracChangeset for help on using the changeset viewer.