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

Side by Side Diff: sky/engine/web/WebViewImpl.cpp

Issue 763013002: Get rid of the remaining uses of GraphicsLayer. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix diff Created 6 years 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 | « sky/engine/web/WebViewImpl.h ('k') | sky/engine/web/painting/ContinuousPainter.h » ('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) 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 #include "sky/engine/public/web/WebNode.h" 92 #include "sky/engine/public/web/WebNode.h"
93 #include "sky/engine/public/web/WebRange.h" 93 #include "sky/engine/public/web/WebRange.h"
94 #include "sky/engine/public/web/WebTextInputInfo.h" 94 #include "sky/engine/public/web/WebTextInputInfo.h"
95 #include "sky/engine/public/web/WebViewClient.h" 95 #include "sky/engine/public/web/WebViewClient.h"
96 #include "sky/engine/web/CompositionUnderlineVectorBuilder.h" 96 #include "sky/engine/web/CompositionUnderlineVectorBuilder.h"
97 #include "sky/engine/web/GraphicsLayerFactoryChromium.h" 97 #include "sky/engine/web/GraphicsLayerFactoryChromium.h"
98 #include "sky/engine/web/LinkHighlight.h" 98 #include "sky/engine/web/LinkHighlight.h"
99 #include "sky/engine/web/WebInputEventConversion.h" 99 #include "sky/engine/web/WebInputEventConversion.h"
100 #include "sky/engine/web/WebLocalFrameImpl.h" 100 #include "sky/engine/web/WebLocalFrameImpl.h"
101 #include "sky/engine/web/WebSettingsImpl.h" 101 #include "sky/engine/web/WebSettingsImpl.h"
102 #include "sky/engine/web/painting/ContinuousPainter.h"
103 #include "sky/engine/wtf/CurrentTime.h" 102 #include "sky/engine/wtf/CurrentTime.h"
104 #include "sky/engine/wtf/RefPtr.h" 103 #include "sky/engine/wtf/RefPtr.h"
105 #include "sky/engine/wtf/TemporaryChange.h" 104 #include "sky/engine/wtf/TemporaryChange.h"
106 105
107 // Get rid of WTF's pow define so we can use std::pow. 106 // Get rid of WTF's pow define so we can use std::pow.
108 #undef pow 107 #undef pow
109 #include <cmath> // for std::pow 108 #include <cmath> // for std::pow
110 109
111 namespace blink { 110 namespace blink {
112 111
(...skipping 30 matching lines...) Expand all
143 , m_fixedLayoutSizeLock(false) 142 , m_fixedLayoutSizeLock(false)
144 , m_doingDragAndDrop(false) 143 , m_doingDragAndDrop(false)
145 , m_ignoreInputEvents(false) 144 , m_ignoreInputEvents(false)
146 , m_compositorDeviceScaleFactorOverride(0) 145 , m_compositorDeviceScaleFactorOverride(0)
147 , m_rootLayerScale(1) 146 , m_rootLayerScale(1)
148 , m_suppressNextKeypressEvent(false) 147 , m_suppressNextKeypressEvent(false)
149 , m_imeAcceptEvents(true) 148 , m_imeAcceptEvents(true)
150 , m_isTransparent(false) 149 , m_isTransparent(false)
151 , m_tabsToLinks(false) 150 , m_tabsToLinks(false)
152 , m_rootLayer(0) 151 , m_rootLayer(0)
153 , m_rootGraphicsLayer(0)
154 , m_rootTransformLayer(0)
155 , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium()))
156 , m_matchesHeuristicsForGpuRasterization(false) 152 , m_matchesHeuristicsForGpuRasterization(false)
157 , m_recreatingGraphicsContext(false) 153 , m_recreatingGraphicsContext(false)
158 , m_flingModifier(0) 154 , m_flingModifier(0)
159 , m_flingSourceDevice(false) 155 , m_flingSourceDevice(false)
160 , m_showFPSCounter(false) 156 , m_showFPSCounter(false)
161 , m_showPaintRects(false) 157 , m_showPaintRects(false)
162 , m_showDebugBorders(false) 158 , m_showDebugBorders(false)
163 , m_continuousPaintingEnabled(false) 159 , m_continuousPaintingEnabled(false)
164 , m_showScrollBottleneckRects(false) 160 , m_showScrollBottleneckRects(false)
165 , m_baseBackgroundColor(Color::white) 161 , m_baseBackgroundColor(Color::white)
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS crollEvent); 895 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS crollEvent);
900 } 896 }
901 } 897 }
902 898
903 WTF_LOG(ScriptedAnimationController, "WebViewImpl::beginFrame: page = %d", ! m_page ? 0 : 1); 899 WTF_LOG(ScriptedAnimationController, "WebViewImpl::beginFrame: page = %d", ! m_page ? 0 : 1);
904 if (!m_page) 900 if (!m_page)
905 return; 901 return;
906 902
907 PageWidgetDelegate::animate(m_page.get(), validFrameTime.lastFrameTimeMonoto nic); 903 PageWidgetDelegate::animate(m_page.get(), validFrameTime.lastFrameTimeMonoto nic);
908 904
909 if (m_continuousPaintingEnabled) { 905 if (m_continuousPaintingEnabled)
910 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer);
911 m_client->scheduleAnimation(); 906 m_client->scheduleAnimation();
912 }
913 } 907 }
914 908
915 void WebViewImpl::didCommitFrameToCompositor() 909 void WebViewImpl::didCommitFrameToCompositor()
916 { 910 {
917 } 911 }
918 912
919 void WebViewImpl::layout() 913 void WebViewImpl::layout()
920 { 914 {
921 TRACE_EVENT0("blink", "WebViewImpl::layout"); 915 TRACE_EVENT0("blink", "WebViewImpl::layout");
922 if (!localFrameRootTemporary()) 916 if (!localFrameRootTemporary())
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1919 bool WebViewImpl::tabsToLinks() const 1913 bool WebViewImpl::tabsToLinks() const
1920 { 1914 {
1921 return m_tabsToLinks; 1915 return m_tabsToLinks;
1922 } 1916 }
1923 1917
1924 void WebViewImpl::suppressInvalidations(bool enable) 1918 void WebViewImpl::suppressInvalidations(bool enable)
1925 { 1919 {
1926 m_client->suppressCompositorScheduling(enable); 1920 m_client->suppressCompositorScheduling(enable);
1927 } 1921 }
1928 1922
1929 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer)
1930 {
1931 suppressInvalidations(true);
1932
1933 m_rootGraphicsLayer = layer;
1934 m_rootLayer = layer ? layer->platformLayer() : 0;
1935 m_rootTransformLayer = 0;
1936
1937 updateRootLayerTransform();
1938 suppressInvalidations(false);
1939 }
1940
1941 void WebViewImpl::invalidateRect(const IntRect& rect) 1923 void WebViewImpl::invalidateRect(const IntRect& rect)
1942 { 1924 {
1943 m_client->didInvalidateRect(rect); 1925 m_client->didInvalidateRect(rect);
1944 } 1926 }
1945 1927
1946 GraphicsLayerFactory* WebViewImpl::graphicsLayerFactory() const
1947 {
1948 return m_graphicsLayerFactory.get();
1949 }
1950
1951 GraphicsLayer* WebViewImpl::rootGraphicsLayer()
1952 {
1953 return m_rootGraphicsLayer;
1954 }
1955
1956 void WebViewImpl::scheduleAnimation() 1928 void WebViewImpl::scheduleAnimation()
1957 { 1929 {
1958 m_client->scheduleAnimation(); 1930 m_client->scheduleAnimation();
1959 } 1931 }
1960 1932
1961 void WebViewImpl::updateMainFrameScrollPosition(const IntPoint& scrollPosition, bool programmaticScroll) 1933 void WebViewImpl::updateMainFrameScrollPosition(const IntPoint& scrollPosition, bool programmaticScroll)
1962 { 1934 {
1963 // FIXME(sky): Remove 1935 // FIXME(sky): Remove
1964 } 1936 }
1965 1937
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2001 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden); 1973 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden);
2002 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState); 1974 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState);
2003 } 1975 }
2004 1976
2005 bool WebViewImpl::shouldDisableDesktopWorkarounds() 1977 bool WebViewImpl::shouldDisableDesktopWorkarounds()
2006 { 1978 {
2007 return true; 1979 return true;
2008 } 1980 }
2009 1981
2010 } // namespace blink 1982 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | sky/engine/web/painting/ContinuousPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698