Changeset 142581 in webkit
- Timestamp:
- Feb 11, 2013 10:42:53 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/Platform/ChangeLog
r142569 r142581 1 2013-02-11 James Robinson <jamesr@chromium.org> 2 3 [chromium] Add WebUnitTestSupport::createLayerTreeViewForTesting for webkit_unit_tests 4 https://bugs.webkit.org/show_bug.cgi?id=109403 5 6 Reviewed by Adam Barth. 7 8 webkit_unit_tests that need compositing support need only a simple WebLayerTreeView implementation, not the full 9 thing. 10 11 * chromium/public/WebCompositorSupport.h: 12 (WebCompositorSupport): 13 (WebKit::WebCompositorSupport::createLayerTreeView): 14 * chromium/public/WebUnitTestSupport.h: 15 (WebKit): 16 (WebUnitTestSupport): 17 (WebKit::WebUnitTestSupport::createLayerTreeViewForTesting): 18 1 19 2013-02-11 Sheriff Bot <webkit.review.bot@gmail.com> 2 20 -
trunk/Source/Platform/chromium/public/WebCompositorSupport.h
r142569 r142581 70 70 virtual void shutdown() { } 71 71 72 // May return 0 if initialization fails.73 virtual WebLayerTreeView* createLayerTreeView(WebLayerTreeViewClient*, const WebLayer& root, const WebLayerTreeView::Settings&) { return 0; }74 75 72 // Creates an output surface for the compositor backed by a 3d context. 76 73 virtual WebCompositorOutputSurface* createOutputSurfaceFor3D(WebKit::WebGraphicsContext3D*) { return 0; } … … 108 105 virtual WebTransformOperations* createTransformOperations() { return 0; } 109 106 107 108 // Testing ------------------------------------------------------ 109 110 // DEPRECATED 111 // May return 0 if initialization fails. 112 virtual WebLayerTreeView* createLayerTreeView(WebLayerTreeViewClient*, const WebLayer& root, const WebLayerTreeView::Settings&) { return 0; } 113 110 114 protected: 111 115 virtual ~WebCompositorSupport() { } -
trunk/Source/Platform/chromium/public/WebUnitTestSupport.h
r142569 r142581 32 32 namespace WebKit { 33 33 34 class WebLayerTreeView; 34 35 class WebURL; 35 36 class WebURLResponse; … … 53 54 // Returns the root directory of the WebKit code. 54 55 virtual WebString webKitRootDir() { return WebString(); } 56 57 // Constructs a WebLayerTreeView set up with reasonable defaults for 58 // testing. A LayerTreeTypeUnitTest view can initialize and perform most 59 // operations, but is not capable of rendering pixels. A 60 // LayerTreeTypeLayoutTest view can render. 61 62 #define HAVE_CREATELAYERTREEVIEWFORTESTING 1 63 enum TestViewType { 64 TestViewTypeUnitTest, 65 TestViewTypeLayoutTest 66 }; 67 virtual WebLayerTreeView* createLayerTreeViewForTesting(TestViewType type) { return 0; } 55 68 }; 56 69 -
trunk/Source/WebKit/chromium/ChangeLog
r142576 r142581 1 2013-02-11 James Robinson <jamesr@chromium.org> 2 3 [chromium] Add WebUnitTestSupport::createLayerTreeViewForTesting for webkit_unit_tests 4 https://bugs.webkit.org/show_bug.cgi?id=109403 5 6 Reviewed by Adam Barth. 7 8 * tests/GraphicsLayerChromiumTest.cpp: 9 (WebKit::GraphicsLayerChromiumTest::GraphicsLayerChromiumTest): 10 * tests/ScrollingCoordinatorChromiumTest.cpp: 11 (WebKit::FakeWebViewClient::initializeLayerTreeView): 12 1 13 2013-02-11 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp
r142569 r142581 36 36 #include <gtest/gtest.h> 37 37 #include <public/Platform.h> 38 #include <public/WebCompositorSupport.h>39 38 #include <public/WebFloatAnimationCurve.h> 40 39 #include <public/WebGraphicsContext3D.h> 41 40 #include <public/WebLayerTreeView.h> 42 41 #include <public/WebTransformationMatrix.h> 42 #include <public/WebUnitTestSupport.h> 43 43 #include <wtf/PassOwnPtr.h> 44 44 … … 63 63 m_graphicsLayer = adoptPtr(new GraphicsLayerChromium(&m_client)); 64 64 m_platformLayer = m_graphicsLayer->platformLayer(); 65 m_layerTreeView = adoptPtr(Platform::current()->compositorSupport()->createLayerTreeView(&m_layerTreeViewClient, *m_platformLayer, WebLayerTreeView::Settings())); 65 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLayerTreeViewForTesting(WebUnitTestSupport::TestViewTypeUnitTest)); 66 ASSERT(m_layerTreeView); 67 m_layerTreeView->setRootLayer(*m_platformLayer); 66 68 m_layerTreeView->setViewportSize(WebSize(1, 1), WebSize(1, 1)); 67 69 } -
trunk/Source/WebKit/chromium/tests/ScrollingCoordinatorChromiumTest.cpp
r142569 r142581 60 60 virtual void initializeLayerTreeView(WebLayerTreeViewClient* client, const WebLayer& rootLayer, const WebLayerTreeView::Settings& settings) 61 61 { 62 m_layerTreeView = adoptPtr(Platform::current()-> compositorSupport()->createLayerTreeView(client, rootLayer, settings));62 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLayerTreeViewForTesting(WebUnitTestSupport::TestViewTypeUnitTest)); 63 63 ASSERT(m_layerTreeView); 64 m_layerTreeView->setRootLayer(rootLayer); 64 65 } 65 66
Note: See TracChangeset
for help on using the changeset viewer.