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

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

Issue 1119763003: Animations: Port LinkHighlight to use compositor timelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix code review issues (add ASSERTs) Created 5 years, 5 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
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | no next file » | 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #include "platform/fonts/FontCache.h" 111 #include "platform/fonts/FontCache.h"
112 #include "platform/graphics/Color.h" 112 #include "platform/graphics/Color.h"
113 #include "platform/graphics/FirstPaintInvalidationTracking.h" 113 #include "platform/graphics/FirstPaintInvalidationTracking.h"
114 #include "platform/graphics/Image.h" 114 #include "platform/graphics/Image.h"
115 #include "platform/graphics/ImageBuffer.h" 115 #include "platform/graphics/ImageBuffer.h"
116 #include "platform/graphics/gpu/DrawingBuffer.h" 116 #include "platform/graphics/gpu/DrawingBuffer.h"
117 #include "platform/scroll/ScrollbarTheme.h" 117 #include "platform/scroll/ScrollbarTheme.h"
118 #include "platform/weborigin/SchemeRegistry.h" 118 #include "platform/weborigin/SchemeRegistry.h"
119 #include "public/platform/Platform.h" 119 #include "public/platform/Platform.h"
120 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" 120 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h"
121 #include "public/platform/WebCompositorSupport.h"
121 #include "public/platform/WebDragData.h" 122 #include "public/platform/WebDragData.h"
122 #include "public/platform/WebFloatPoint.h" 123 #include "public/platform/WebFloatPoint.h"
123 #include "public/platform/WebGestureCurve.h" 124 #include "public/platform/WebGestureCurve.h"
124 #include "public/platform/WebImage.h" 125 #include "public/platform/WebImage.h"
125 #include "public/platform/WebLayerTreeView.h" 126 #include "public/platform/WebLayerTreeView.h"
126 #include "public/platform/WebURLRequest.h" 127 #include "public/platform/WebURLRequest.h"
127 #include "public/platform/WebVector.h" 128 #include "public/platform/WebVector.h"
128 #include "public/web/WebAXObject.h" 129 #include "public/web/WebAXObject.h"
129 #include "public/web/WebActiveWheelFlingParameters.h" 130 #include "public/web/WebActiveWheelFlingParameters.h"
130 #include "public/web/WebAutofillClient.h" 131 #include "public/web/WebAutofillClient.h"
(...skipping 2535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2666 } 2667 }
2667 } 2668 }
2668 2669
2669 bool WebViewImpl::isAcceleratedCompositingActive() const 2670 bool WebViewImpl::isAcceleratedCompositingActive() const
2670 { 2671 {
2671 return m_rootLayer; 2672 return m_rootLayer;
2672 } 2673 }
2673 2674
2674 void WebViewImpl::willCloseLayerTreeView() 2675 void WebViewImpl::willCloseLayerTreeView()
2675 { 2676 {
2677 if (m_linkHighlightsTimeline) {
2678 detachCompositorAnimationTimeline(m_linkHighlightsTimeline.get());
2679 m_linkHighlightsTimeline.clear();
2680 }
2681
2676 setRootGraphicsLayer(nullptr); 2682 setRootGraphicsLayer(nullptr);
2677 m_layerTreeView = 0; 2683 m_layerTreeView = 0;
2678 } 2684 }
2679 2685
2680 void WebViewImpl::didAcquirePointerLock() 2686 void WebViewImpl::didAcquirePointerLock()
2681 { 2687 {
2682 if (page()) 2688 if (page())
2683 page()->pointerLockController().didAcquirePointerLock(); 2689 page()->pointerLockController().didAcquirePointerLock();
2684 } 2690 }
2685 2691
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after
4155 } 4161 }
4156 4162
4157 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) 4163 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl())
4158 devTools->layerTreeViewChanged(m_layerTreeView); 4164 devTools->layerTreeViewChanged(m_layerTreeView);
4159 4165
4160 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView != 0); 4166 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView != 0);
4161 4167
4162 // FIXME: only unittests, click to play, Android priting, and printing (for headers and footers) 4168 // FIXME: only unittests, click to play, Android priting, and printing (for headers and footers)
4163 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView. 4169 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView.
4164 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew()); 4170 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew());
4171
4172 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && m_layer TreeView) {
4173 ASSERT(Platform::current()->compositorSupport());
4174 m_linkHighlightsTimeline = adoptPtr(Platform::current()->compositorSuppo rt()->createAnimationTimeline());
4175 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get());
4176 }
4165 } 4177 }
4166 4178
4167 void WebViewImpl::applyViewportDeltas( 4179 void WebViewImpl::applyViewportDeltas(
4168 const WebFloatSize& pinchViewportDelta, 4180 const WebFloatSize& pinchViewportDelta,
4169 const WebFloatSize& layoutViewportDelta, 4181 const WebFloatSize& layoutViewportDelta,
4170 const WebFloatSize& elasticOverscrollDelta, 4182 const WebFloatSize& elasticOverscrollDelta,
4171 float pageScaleDelta, 4183 float pageScaleDelta,
4172 float topControlsShownRatioDelta) 4184 float topControlsShownRatioDelta)
4173 { 4185 {
4174 if (!mainFrameImpl()) 4186 if (!mainFrameImpl())
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
4373 { 4385 {
4374 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4386 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4375 } 4387 }
4376 4388
4377 void WebViewImpl::forceNextDrawingBufferCreationToFail() 4389 void WebViewImpl::forceNextDrawingBufferCreationToFail()
4378 { 4390 {
4379 DrawingBuffer::forceNextDrawingBufferCreationToFail(); 4391 DrawingBuffer::forceNextDrawingBufferCreationToFail();
4380 } 4392 }
4381 4393
4382 } // namespace blink 4394 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698