Chromium Code Reviews| Index: Source/web/PageOverlayTest.cpp |
| diff --git a/Source/web/PageOverlayTest.cpp b/Source/web/PageOverlayTest.cpp |
| index afbe4049ad8fc521358cc6785640f4ba6777596a..eb1b5065b06b0c143d1b7303a87a115b51f1eb79 100644 |
| --- a/Source/web/PageOverlayTest.cpp |
| +++ b/Source/web/PageOverlayTest.cpp |
| @@ -105,10 +105,11 @@ public: |
| void paintPageOverlay(WebGraphicsContext* context, const WebSize& size) override |
| { |
| GraphicsContext& graphicsContext = toWebGraphicsContextImpl(context)->graphicsContext(); |
| - FloatRect rect(0, 0, size.width, size.height); |
| - DrawingRecorder drawingRecorder(graphicsContext, *this, DisplayItem::PageOverlay, rect); |
| - if (!drawingRecorder.canUseCachedDrawing()) |
| + if (!DrawingRecorder::useCachedDrawingIfPossible(graphicsContext, *this, DisplayItem::PageOverlay)) { |
|
Xianzhu
2015/07/03 01:24:42
Nit:
'if (DrawingRecorder::...)
return;'
seems
pdr.
2015/07/03 02:38:04
I agree. Done.
|
| + FloatRect rect(0, 0, size.width, size.height); |
| + DrawingRecorder drawingRecorder(graphicsContext, *this, DisplayItem::PageOverlay, rect); |
| graphicsContext.fillRect(rect, m_color); |
| + } |
| } |
| DisplayItemClient displayItemClient() const { return toDisplayItemClient(this); } |