diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-12 01:53:49 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-12 01:53:49 +0000 |
commit | c8756fbeef2763cd62d7174d4e0253c51864fe7b (patch) | |
tree | b9f200690c8420ea37a4652bb599ea3b91a9a1b3 /cc/layer_tree_host.cc | |
parent | e7cede117cf24104a57b6dd9c43e9c5f2a602063 (diff) | |
download | chromium_src-c8756fbeef2763cd62d7174d4e0253c51864fe7b.zip chromium_src-c8756fbeef2763cd62d7174d4e0253c51864fe7b.tar.gz chromium_src-c8756fbeef2763cd62d7174d4e0253c51864fe7b.tar.bz2 |
Implement WebKit::WebUnitTestSupport::createLayerTreeViewForTesting()
This provides an implementation WebKit::WebUnitTestSupport::createLayerTreeViewForTesting()
for webkit_unit_tests that want to instantiate compositing support and need initialization
to succeed but do not need to actually render anything. Critically, this sort of
view does not depend on any particular client or settings.
This appears to be a lot of code, but it's actually a bit of movement and very
little new code. The primary movement is extracting most of the test class
cc/test/fake_web_graphics_context3d.h into cc/fake_web_graphics_context3d.h so
that it can be exported to other modules as a regular class. This is necessary
since webkit_unit_tests are in a different component and must use only the
normally exported parts of the cc library. cc/test/test_web_graphics_context3d.h
has all of the extra bells and whistles and assertions for cc_unittests.
WebLayerTreeViewImplForTesting uses a very simple context and does not depend
on an external client at all. This results in two subtle but very significant
properties (which are the point of this whole exercise) - the unit tests no longer
depend on WebLayerTreeViewClient or WebGraphicsContext3D at all. The entire
notion of what the context type is now entirely hidden in the chromium side of
the codebase and can be swapped out for something else (like gpu::GLES2Interface)
without any further changes on the WebKit side.
After this patch, the only remaining caller of WebCompositorSupport::createLayerTreeView
in the WebKit tree is WebViewHost, which needs to instantiate a view that can
render pixels (using mesa) for DumpRenderTree. I'll address that separately.
BUG=175383
Review URL: https://codereview.chromium.org/12211110
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer_tree_host.cc')
0 files changed, 0 insertions, 0 deletions