diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-24 01:17:52 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-24 01:17:52 +0000 |
commit | c2cc8bb939c2bcf8ffe63902208be0380bd4dd24 (patch) | |
tree | 0722e334cc1e0f68790faf97ffaaf1980c4e8699 /cc/trees/layer_tree_host_unittest.cc | |
parent | b8dcdcca68e0e2c1bbc9dc7187d7e53960506aba (diff) | |
download | chromium_src-c2cc8bb939c2bcf8ffe63902208be0380bd4dd24.zip chromium_src-c2cc8bb939c2bcf8ffe63902208be0380bd4dd24.tar.gz chromium_src-c2cc8bb939c2bcf8ffe63902208be0380bd4dd24.tar.bz2 |
cc: Use the onscreen context to perform composited ganesh filters.
This avoids the need for an offscreen context at all. Since the GPU
rasterization path is already doing similar stuff, we need to support
both cc and ganesh using the same context. This is a bit trickier
since it occurs in the middle of drawing a frame instead of between
frames, but as long as we restore all state that GLRenderer ever sets,
it works.
R=enne@chromium.org, senorblanco@chromium.org
BUG=366132
Review URL: https://codereview.chromium.org/250083002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/layer_tree_host_unittest.cc')
-rw-r--r-- | cc/trees/layer_tree_host_unittest.cc | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc index b1e33dd..60c71be 100644 --- a/cc/trees/layer_tree_host_unittest.cc +++ b/cc/trees/layer_tree_host_unittest.cc @@ -4633,50 +4633,6 @@ class LayerSetsNeedsFilterContext : public Layer { bool needs_context_; }; -class LayerTreeHostTestOffscreenContext : public LayerTreeHostTest { - protected: - virtual void SetupTree() OVERRIDE { - scoped_refptr<LayerSetsNeedsFilterContext> root = - LayerSetsNeedsFilterContext::Create(); - root->SetIsDrawable(true); - root->SetAnchorPoint(gfx::PointF()); - root->SetBounds(gfx::Size(10, 10)); - root->set_needs_context(with_context_); - layer_tree_host()->SetRootLayer(root); - LayerTreeHostTest::SetupTree(); - } - - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } - - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { - bool expect_context = with_context_; - if (delegating_renderer()) - expect_context = false; - EXPECT_EQ(expect_context, !!host_impl->offscreen_context_provider()); - EndTest(); - } - - virtual void AfterTest() OVERRIDE {} - - bool with_context_; -}; - -class LayerTreeHostTestOffscreenContext_NoContext - : public LayerTreeHostTestOffscreenContext { - protected: - LayerTreeHostTestOffscreenContext_NoContext() { with_context_ = false; } -}; - -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestOffscreenContext_NoContext); - -class LayerTreeHostTestOffscreenContext_WithContext - : public LayerTreeHostTestOffscreenContext { - protected: - LayerTreeHostTestOffscreenContext_WithContext() { with_context_ = true; } -}; - -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestOffscreenContext_WithContext); - class LayerTreeHostTestNoQuadsForEmptyLayer : public LayerTreeHostTest { protected: virtual void SetupTree() OVERRIDE { |