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

Side by Side Diff: third_party/WebKit/Source/web/PageWidgetDelegate.cpp

Issue 2755183002: Change drawPicture calls to playback to avoid culling (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 dirtyRect); 90 dirtyRect);
91 view->paint(paintContext, globalPaintFlags, CullRect(dirtyRect)); 91 view->paint(paintContext, globalPaintFlags, CullRect(dirtyRect));
92 } else { 92 } else {
93 DrawingRecorder drawingRecorder( 93 DrawingRecorder drawingRecorder(
94 paintContext, builder, 94 paintContext, builder,
95 DisplayItem::kPageWidgetDelegateBackgroundFallback, dirtyRect); 95 DisplayItem::kPageWidgetDelegateBackgroundFallback, dirtyRect);
96 paintContext.fillRect(dirtyRect, Color::white); 96 paintContext.fillRect(dirtyRect, Color::white);
97 } 97 }
98 } 98 }
99 99
100 canvas->drawPicture(builder.endRecording()); 100 canvas->PlaybackPaintRecord(builder.endRecording().get());
101 } 101 }
102 102
103 void PageWidgetDelegate::paint(Page& page, 103 void PageWidgetDelegate::paint(Page& page,
104 WebCanvas* canvas, 104 WebCanvas* canvas,
105 const WebRect& rect, 105 const WebRect& rect,
106 LocalFrame& root) { 106 LocalFrame& root) {
107 paintInternal(page, canvas, rect, root, GlobalPaintNormalPhase); 107 paintInternal(page, canvas, rect, root, GlobalPaintNormalPhase);
108 } 108 }
109 109
110 void PageWidgetDelegate::paintIgnoringCompositing(Page& page, 110 void PageWidgetDelegate::paintIgnoringCompositing(Page& page,
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 const WebTouchEvent& event, 269 const WebTouchEvent& event,
270 const std::vector<const WebInputEvent*>& coalescedEvents) { 270 const std::vector<const WebInputEvent*>& coalescedEvents) {
271 WebTouchEvent transformedEvent = 271 WebTouchEvent transformedEvent =
272 TransformWebTouchEvent(mainFrame.view(), event); 272 TransformWebTouchEvent(mainFrame.view(), event);
273 return mainFrame.eventHandler().handleTouchEvent( 273 return mainFrame.eventHandler().handleTouchEvent(
274 transformedEvent, 274 transformedEvent,
275 TransformWebTouchEventVector(mainFrame.view(), coalescedEvents)); 275 TransformWebTouchEventVector(mainFrame.view(), coalescedEvents));
276 } 276 }
277 277
278 } // namespace blink 278 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698