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

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

Issue 46163008: Revert "Re-land deferred compositing updates with fixed assumptions" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 20 matching lines...) Expand all
31 #include "config.h" 31 #include "config.h"
32 #include "PageWidgetDelegate.h" 32 #include "PageWidgetDelegate.h"
33 33
34 #include "PageOverlayList.h" 34 #include "PageOverlayList.h"
35 #include "WebInputEvent.h" 35 #include "WebInputEvent.h"
36 #include "WebInputEventConversion.h" 36 #include "WebInputEventConversion.h"
37 #include "core/page/EventHandler.h" 37 #include "core/page/EventHandler.h"
38 #include "core/frame/Frame.h" 38 #include "core/frame/Frame.h"
39 #include "core/frame/FrameView.h" 39 #include "core/frame/FrameView.h"
40 #include "core/platform/graphics/GraphicsContext.h" 40 #include "core/platform/graphics/GraphicsContext.h"
41 #include "core/rendering/RenderLayerCompositor.h"
42 #include "core/rendering/RenderView.h"
43 #include "wtf/CurrentTime.h" 41 #include "wtf/CurrentTime.h"
44 42
45 using namespace WebCore; 43 using namespace WebCore;
46 44
47 namespace WebKit { 45 namespace WebKit {
48 46
49 static inline FrameView* mainFrameView(Page* page) 47 static inline FrameView* mainFrameView(Page* page)
50 { 48 {
51 if (!page) 49 if (!page)
52 return 0; 50 return 0;
(...skipping 20 matching lines...) Expand all
73 // they need to be told that we are updating the screen. The problem is that 71 // they need to be told that we are updating the screen. The problem is that
74 // the native widgets need to recalculate their clip region and not overlap 72 // the native widgets need to recalculate their clip region and not overlap
75 // any of our non-native widgets. To force the resizing, call 73 // any of our non-native widgets. To force the resizing, call
76 // setFrameRect(). This will be a quick operation for most frames, but the 74 // setFrameRect(). This will be a quick operation for most frames, but the
77 // NativeWindowWidgets will update a proper clipping region. 75 // NativeWindowWidgets will update a proper clipping region.
78 view->setFrameRect(view->frameRect()); 76 view->setFrameRect(view->frameRect());
79 77
80 // setFrameRect may have the side-effect of causing existing page layout to 78 // setFrameRect may have the side-effect of causing existing page layout to
81 // be invalidated, so layout needs to be called last. 79 // be invalidated, so layout needs to be called last.
82 view->updateLayoutAndStyleIfNeededRecursive(); 80 view->updateLayoutAndStyleIfNeededRecursive();
83
84 // For now, as we know this is the point in code where the compositor has
85 // actually asked for Blink to update the composited layer tree. So finally
86 // do all the deferred work for updateCompositingLayers() here.
87 view->renderView()->compositor()->updateCompositingLayers(CompositingUpdateF inishAllDeferredWork);
88 } 81 }
89 82
90 void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background) 83 void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background)
91 { 84 {
92 if (rect.isEmpty()) 85 if (rect.isEmpty())
93 return; 86 return;
94 GraphicsContext gc(canvas); 87 GraphicsContext gc(canvas);
95 gc.setCertainlyOpaque(background == Opaque); 88 gc.setCertainlyOpaque(background == Opaque);
96 gc.applyDeviceScaleFactor(page->deviceScaleFactor()); 89 gc.applyDeviceScaleFactor(page->deviceScaleFactor());
97 gc.setUseHighResMarkers(page->deviceScaleFactor() > 1.5f); 90 gc.setUseHighResMarkers(page->deviceScaleFactor() > 1.5f);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 { 209 {
217 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m ainFrame.view(), event)); 210 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m ainFrame.view(), event));
218 } 211 }
219 212
220 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv ent& event) 213 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv ent& event)
221 { 214 {
222 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m ainFrame.view(), event)); 215 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m ainFrame.view(), event));
223 } 216 }
224 217
225 } 218 }
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698