mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Win: Improve redraw and scrolling performance (issue #360).
- Win: Fix CefBrowser::GetImage() and add "Get Image" example to cefclient (issue #377). - Pass the list of dirty rectangles to CefRenderHandler::Paint(). (issue #415). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@368 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -86,9 +86,8 @@ CefBrowserImpl::PaintDelegate::~PaintDelegate()
|
||||
{
|
||||
}
|
||||
|
||||
void CefBrowserImpl::PaintDelegate::Paint(bool popup,
|
||||
const gfx::Rect& dirtyRect,
|
||||
const void* buffer)
|
||||
void CefBrowserImpl::PaintDelegate::Paint(
|
||||
bool popup, const std::vector<CefRect>& dirtyRects, const void* buffer)
|
||||
{
|
||||
CefRefPtr<CefClient> client = browser_->GetClient();
|
||||
if (!client.get())
|
||||
@@ -97,9 +96,7 @@ void CefBrowserImpl::PaintDelegate::Paint(bool popup,
|
||||
if (!handler.get())
|
||||
return;
|
||||
|
||||
CefRect rect(dirtyRect.x(), dirtyRect.y(), dirtyRect.width(),
|
||||
dirtyRect.height());
|
||||
handler->OnPaint(browser_, (popup?PET_POPUP:PET_VIEW), rect, buffer);
|
||||
handler->OnPaint(browser_, (popup?PET_POPUP:PET_VIEW), dirtyRects, buffer);
|
||||
}
|
||||
|
||||
|
||||
@@ -1024,8 +1021,15 @@ void CefBrowserImpl::UIT_Invalidate(const CefRect& dirtyRect)
|
||||
REQUIRE_UIT();
|
||||
WebViewHost* host = UIT_GetWebViewHost();
|
||||
if (host) {
|
||||
host->InvalidateRect(gfx::Rect(dirtyRect.x, dirtyRect.y, dirtyRect.width,
|
||||
dirtyRect.height));
|
||||
gfx::Rect rect(dirtyRect.x, dirtyRect.y, dirtyRect.width,
|
||||
dirtyRect.height);
|
||||
|
||||
// Used when window rendering is disabled to send the specified region to
|
||||
// the paint delegate when WebWidget::Paint() is next called.
|
||||
host->UpdateRedrawRect(rect);
|
||||
|
||||
// Cause WebWidget::Paint() to be called when next appropriate.
|
||||
host->InvalidateRect(rect);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user