Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1410)

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm

Issue 1422493003: Change Widget subclasses to use a CullRect instead of an IntRect for painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm
index 64fbdcbc5f9b54fd89a9d9fc5264628b78820e92..2e8a6d2b184310e058fb2daa9ca8e7c6ebdcdfea 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm
@@ -33,6 +33,7 @@
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/ImageBuffer.h"
+#include "platform/graphics/paint/CullRect.h"
#include "platform/graphics/paint/DrawingRecorder.h"
#include "platform/mac/ThemeMac.h"
#include "platform/scroll/ScrollbarThemeClient.h"
@@ -67,7 +68,7 @@ void ScrollbarThemeMacNonOverlayAPI::updateButtonPlacement(ScrollbarButtonsPlace
// - drawing using WebThemeEngine functions
// - drawing tickmarks
// - Skia specific changes
-bool ScrollbarThemeMacNonOverlayAPI::paint(const ScrollbarThemeClient* scrollbar, GraphicsContext* context, const IntRect& damageRect)
+bool ScrollbarThemeMacNonOverlayAPI::paint(const ScrollbarThemeClient* scrollbar, GraphicsContext* context, const CullRect& cullRect)
{
DisplayItem::Type displayItemType = scrollbar->orientation() == HorizontalScrollbar ? DisplayItem::ScrollbarHorizontal : DisplayItem::ScrollbarVertical;
if (DrawingRecorder::useCachedDrawingIfPossible(*context, *scrollbar, displayItemType))
@@ -112,7 +113,7 @@ bool ScrollbarThemeMacNonOverlayAPI::paint(const ScrollbarThemeClient* scrollbar
trackInfo.bounds = IntRect(IntPoint(), scrollbar->frameRect().size());
IntRect bufferRect(scrollbar->frameRect());
- bufferRect.intersect(damageRect);
+ bufferRect.intersect(cullRect.m_rect);
bufferRect.move(-scrollbar->frameRect().x(), -scrollbar->frameRect().y());
imageBuffer = ImageBuffer::create(bufferRect.size());

Powered by Google App Engine
This is Rietveld 408576698