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

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

Issue 1810853002: Blink Platform: Erase GraphicsLayerFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/web.gypi » ('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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 #include "public/web/WebSelection.h" 150 #include "public/web/WebSelection.h"
151 #include "public/web/WebTextInputInfo.h" 151 #include "public/web/WebTextInputInfo.h"
152 #include "public/web/WebViewClient.h" 152 #include "public/web/WebViewClient.h"
153 #include "public/web/WebWindowFeatures.h" 153 #include "public/web/WebWindowFeatures.h"
154 #include "web/CompositionUnderlineVectorBuilder.h" 154 #include "web/CompositionUnderlineVectorBuilder.h"
155 #include "web/ContextFeaturesClientImpl.h" 155 #include "web/ContextFeaturesClientImpl.h"
156 #include "web/ContextMenuAllowedScope.h" 156 #include "web/ContextMenuAllowedScope.h"
157 #include "web/DatabaseClientImpl.h" 157 #include "web/DatabaseClientImpl.h"
158 #include "web/DevToolsEmulator.h" 158 #include "web/DevToolsEmulator.h"
159 #include "web/FullscreenController.h" 159 #include "web/FullscreenController.h"
160 #include "web/GraphicsLayerFactoryChromium.h"
161 #include "web/InspectorOverlay.h" 160 #include "web/InspectorOverlay.h"
162 #include "web/LinkHighlightImpl.h" 161 #include "web/LinkHighlightImpl.h"
163 #include "web/PageOverlay.h" 162 #include "web/PageOverlay.h"
164 #include "web/PrerendererClientImpl.h" 163 #include "web/PrerendererClientImpl.h"
165 #include "web/ResizeViewportAnchor.h" 164 #include "web/ResizeViewportAnchor.h"
166 #include "web/RotationViewportAnchor.h" 165 #include "web/RotationViewportAnchor.h"
167 #include "web/SpeechRecognitionClientProxy.h" 166 #include "web/SpeechRecognitionClientProxy.h"
168 #include "web/StorageQuotaClientImpl.h" 167 #include "web/StorageQuotaClientImpl.h"
169 #include "web/ValidationMessageClientImpl.h" 168 #include "web/ValidationMessageClientImpl.h"
170 #include "web/ViewportAnchor.h" 169 #include "web/ViewportAnchor.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 , m_suppressNextKeypressEvent(false) 423 , m_suppressNextKeypressEvent(false)
425 , m_imeAcceptEvents(true) 424 , m_imeAcceptEvents(true)
426 , m_operationsAllowed(WebDragOperationNone) 425 , m_operationsAllowed(WebDragOperationNone)
427 , m_dragOperation(WebDragOperationNone) 426 , m_dragOperation(WebDragOperationNone)
428 , m_devToolsEmulator(nullptr) 427 , m_devToolsEmulator(nullptr)
429 , m_isTransparent(false) 428 , m_isTransparent(false)
430 , m_tabsToLinks(false) 429 , m_tabsToLinks(false)
431 , m_layerTreeView(nullptr) 430 , m_layerTreeView(nullptr)
432 , m_rootLayer(nullptr) 431 , m_rootLayer(nullptr)
433 , m_rootGraphicsLayer(nullptr) 432 , m_rootGraphicsLayer(nullptr)
434 , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium()))
435 , m_matchesHeuristicsForGpuRasterization(false) 433 , m_matchesHeuristicsForGpuRasterization(false)
436 , m_flingModifier(0) 434 , m_flingModifier(0)
437 , m_flingSourceDevice(WebGestureDeviceUninitialized) 435 , m_flingSourceDevice(WebGestureDeviceUninitialized)
438 , m_fullscreenController(FullscreenController::create(this)) 436 , m_fullscreenController(FullscreenController::create(this))
439 , m_showFPSCounter(false) 437 , m_showFPSCounter(false)
440 , m_baseBackgroundColor(Color::white) 438 , m_baseBackgroundColor(Color::white)
441 , m_backgroundColorOverride(Color::transparent) 439 , m_backgroundColorOverride(Color::transparent)
442 , m_zoomFactorOverride(0) 440 , m_zoomFactorOverride(0)
443 , m_userGestureObserved(false) 441 , m_userGestureObserved(false)
444 , m_shouldDispatchFirstVisuallyNonEmptyLayout(false) 442 , m_shouldDispatchFirstVisuallyNonEmptyLayout(false)
(...skipping 3763 matching lines...) Expand 10 before | Expand all | Expand 10 after
4208 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer) 4206 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer)
4209 { 4207 {
4210 if (!m_layerTreeView) 4208 if (!m_layerTreeView)
4211 return; 4209 return;
4212 4210
4213 // In SPv2, we attach layers via PaintArtifactCompositor, rather than 4211 // In SPv2, we attach layers via PaintArtifactCompositor, rather than
4214 // supplying a root GraphicsLayer from PaintLayerCompositor. 4212 // supplying a root GraphicsLayer from PaintLayerCompositor.
4215 ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 4213 ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
4216 4214
4217 VisualViewport& visualViewport = page()->frameHost().visualViewport(); 4215 VisualViewport& visualViewport = page()->frameHost().visualViewport();
4218 visualViewport.attachToLayerTree(layer, graphicsLayerFactory()); 4216 visualViewport.attachToLayerTree(layer);
4219 if (layer) { 4217 if (layer) {
4220 m_rootGraphicsLayer = visualViewport.rootGraphicsLayer(); 4218 m_rootGraphicsLayer = visualViewport.rootGraphicsLayer();
4221 m_rootLayer = m_rootGraphicsLayer->platformLayer(); 4219 m_rootLayer = m_rootGraphicsLayer->platformLayer();
4222 updateRootLayerTransform(); 4220 updateRootLayerTransform();
4223 m_layerTreeView->setRootLayer(*m_rootLayer); 4221 m_layerTreeView->setRootLayer(*m_rootLayer);
4224 // We register viewport layers here since there may not be a layer 4222 // We register viewport layers here since there may not be a layer
4225 // tree view prior to this point. 4223 // tree view prior to this point.
4226 visualViewport.registerLayersWithTreeView(m_layerTreeView); 4224 visualViewport.registerLayersWithTreeView(m_layerTreeView);
4227 updatePageOverlays(); 4225 updatePageOverlays();
4228 // TODO(enne): Work around page visibility changes not being 4226 // TODO(enne): Work around page visibility changes not being
(...skipping 14 matching lines...) Expand all
4243 } 4241 }
4244 4242
4245 void WebViewImpl::invalidateRect(const IntRect& rect) 4243 void WebViewImpl::invalidateRect(const IntRect& rect)
4246 { 4244 {
4247 if (m_layerTreeView) 4245 if (m_layerTreeView)
4248 updateLayerTreeViewport(); 4246 updateLayerTreeViewport();
4249 else if (m_client) 4247 else if (m_client)
4250 m_client->didInvalidateRect(rect); 4248 m_client->didInvalidateRect(rect);
4251 } 4249 }
4252 4250
4253 GraphicsLayerFactory* WebViewImpl::graphicsLayerFactory() const
4254 {
4255 return m_graphicsLayerFactory.get();
4256 }
4257
4258 PaintLayerCompositor* WebViewImpl::compositor() const 4251 PaintLayerCompositor* WebViewImpl::compositor() const
4259 { 4252 {
4260 WebLocalFrameImpl* frame = mainFrameImpl(); 4253 WebLocalFrameImpl* frame = mainFrameImpl();
4261 if (!frame) 4254 if (!frame)
4262 return nullptr; 4255 return nullptr;
4263 4256
4264 Document* document = frame->frame()->document(); 4257 Document* document = frame->frame()->document();
4265 if (!document || !document->layoutView()) 4258 if (!document || !document->layoutView())
4266 return nullptr; 4259 return nullptr;
4267 4260
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
4569 { 4562 {
4570 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4563 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4571 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4564 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4572 if (!page()) 4565 if (!page())
4573 return 1; 4566 return 1;
4574 4567
4575 return page()->deviceScaleFactor(); 4568 return page()->deviceScaleFactor();
4576 } 4569 }
4577 4570
4578 } // namespace blink 4571 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/web.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698