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

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: Rebase. 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
« Source/web/WebViewImpl.h ('K') | « 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 2551 matching lines...) Expand 10 before | Expand all | Expand 10 after
2682 } 2683 }
2683 } 2684 }
2684 2685
2685 bool WebViewImpl::isAcceleratedCompositingActive() const 2686 bool WebViewImpl::isAcceleratedCompositingActive() const
2686 { 2687 {
2687 return m_rootLayer; 2688 return m_rootLayer;
2688 } 2689 }
2689 2690
2690 void WebViewImpl::willCloseLayerTreeView() 2691 void WebViewImpl::willCloseLayerTreeView()
2691 { 2692 {
2693 if (m_linkHighlightsTimeline) {
2694 detachCompositorAnimationTimeline(m_linkHighlightsTimeline.get());
2695 m_linkHighlightsTimeline.clear();
2696 }
2697
2692 setRootGraphicsLayer(nullptr); 2698 setRootGraphicsLayer(nullptr);
2693 m_layerTreeView = 0; 2699 m_layerTreeView = 0;
2694 } 2700 }
2695 2701
2696 void WebViewImpl::didAcquirePointerLock() 2702 void WebViewImpl::didAcquirePointerLock()
2697 { 2703 {
2698 if (page()) 2704 if (page())
2699 page()->pointerLockController().didAcquirePointerLock(); 2705 page()->pointerLockController().didAcquirePointerLock();
2700 } 2706 }
2701 2707
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
4176 } 4182 }
4177 4183
4178 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) 4184 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl())
4179 devTools->layerTreeViewChanged(m_layerTreeView); 4185 devTools->layerTreeViewChanged(m_layerTreeView);
4180 4186
4181 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView != 0); 4187 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView != 0);
4182 4188
4183 // FIXME: only unittests, click to play, Android priting, and printing (for headers and footers) 4189 // FIXME: only unittests, click to play, Android priting, and printing (for headers and footers)
4184 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView. 4190 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView.
4185 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew()); 4191 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew());
4192
4193 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor m::current()->compositorSupport() && m_layerTreeView) {
chrishtr 2015/07/15 14:25:14 Add assert for compositorSupport()
loyso (OOO) 2015/07/21 01:19:07 Done.
4194 m_linkHighlightsTimeline = adoptPtr(Platform::current()->compositorSuppo rt()->createAnimationTimeline());
4195 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get());
4196 }
4186 } 4197 }
4187 4198
4188 void WebViewImpl::applyViewportDeltas( 4199 void WebViewImpl::applyViewportDeltas(
4189 const WebFloatSize& pinchViewportDelta, 4200 const WebFloatSize& pinchViewportDelta,
4190 const WebFloatSize& layoutViewportDelta, 4201 const WebFloatSize& layoutViewportDelta,
4191 const WebFloatSize& elasticOverscrollDelta, 4202 const WebFloatSize& elasticOverscrollDelta,
4192 float pageScaleDelta, 4203 float pageScaleDelta,
4193 float topControlsShownRatioDelta) 4204 float topControlsShownRatioDelta)
4194 { 4205 {
4195 if (!mainFrameImpl()) 4206 if (!mainFrameImpl())
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
4393 { 4404 {
4394 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4405 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4395 } 4406 }
4396 4407
4397 void WebViewImpl::forceNextDrawingBufferCreationToFail() 4408 void WebViewImpl::forceNextDrawingBufferCreationToFail()
4398 { 4409 {
4399 DrawingBuffer::forceNextDrawingBufferCreationToFail(); 4410 DrawingBuffer::forceNextDrawingBufferCreationToFail();
4400 } 4411 }
4401 4412
4402 } // namespace blink 4413 } // namespace blink
OLDNEW
« Source/web/WebViewImpl.h ('K') | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698