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

Unified Diff: cc/trees/layer_tree_host_unittest_delegated.cc

Issue 250083002: cc: Use the onscreen context to perform composited ganesh filters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: onscreenfilters: nit Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_delegated.cc
diff --git a/cc/trees/layer_tree_host_unittest_delegated.cc b/cc/trees/layer_tree_host_unittest_delegated.cc
index ab5e4c20c8a3c0cc410cd5f8e278d17e4f647b4f..360ddd0bf3fcd8d12a240cf1f5e2a90c35356e49 100644
--- a/cc/trees/layer_tree_host_unittest_delegated.cc
+++ b/cc/trees/layer_tree_host_unittest_delegated.cc
@@ -467,126 +467,6 @@ class LayerTreeHostDelegatedTestInvalidFrameAfterContextLost
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostDelegatedTestInvalidFrameAfterContextLost);
-class LayerTreeHostDelegatedTestOffscreenContext_NoFilters
- : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
- protected:
- virtual void BeginTest() OVERRIDE {
- scoped_ptr<DelegatedFrameData> frame =
- CreateFrameData(gfx::Rect(0, 0, 1, 1),
- gfx::Rect(0, 0, 1, 1));
- SetFrameData(frame.Pass());
-
- PostSetNeedsCommitToMainThread();
- }
-
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
- EXPECT_FALSE(host_impl->offscreen_context_provider());
- EndTest();
- }
-};
-
-SINGLE_AND_MULTI_THREAD_TEST_F(
- LayerTreeHostDelegatedTestOffscreenContext_NoFilters);
-
-class LayerTreeHostDelegatedTestOffscreenContext_Filters
- : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
- protected:
- virtual void BeginTest() OVERRIDE {
- scoped_ptr<DelegatedFrameData> frame =
- CreateFrameData(gfx::Rect(0, 0, 1, 1),
- gfx::Rect(0, 0, 1, 1));
-
- FilterOperations filters;
- filters.Append(FilterOperation::CreateGrayscaleFilter(0.5f));
- AddRenderPass(frame.get(),
- RenderPass::Id(2, 1),
- gfx::Rect(0, 0, 1, 1),
- gfx::Rect(0, 0, 1, 1),
- filters,
- FilterOperations());
- SetFrameData(frame.Pass());
-
- PostSetNeedsCommitToMainThread();
- }
-
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
- bool expect_context = !delegating_renderer();
- EXPECT_EQ(expect_context, !!host_impl->offscreen_context_provider());
- EndTest();
- }
-};
-
-SINGLE_AND_MULTI_THREAD_TEST_F(
- LayerTreeHostDelegatedTestOffscreenContext_Filters);
-
-class LayerTreeHostDelegatedTestOffscreenContext_BackgroundFilters
- : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
- protected:
- virtual void BeginTest() OVERRIDE {
- scoped_ptr<DelegatedFrameData> frame =
- CreateFrameData(gfx::Rect(0, 0, 1, 1),
- gfx::Rect(0, 0, 1, 1));
-
- FilterOperations filters;
- filters.Append(FilterOperation::CreateGrayscaleFilter(0.5f));
- AddRenderPass(frame.get(),
- RenderPass::Id(2, 1),
- gfx::Rect(0, 0, 1, 1),
- gfx::Rect(0, 0, 1, 1),
- FilterOperations(),
- filters);
- SetFrameData(frame.Pass());
-
- PostSetNeedsCommitToMainThread();
- }
-
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
- bool expect_context = !delegating_renderer();
- EXPECT_EQ(expect_context, !!host_impl->offscreen_context_provider());
- EndTest();
- }
-};
-
-SINGLE_AND_MULTI_THREAD_TEST_F(
- LayerTreeHostDelegatedTestOffscreenContext_BackgroundFilters);
-
-class LayerTreeHostDelegatedTestOffscreenContext_Filters_AddedToTree
- : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
- protected:
- virtual void BeginTest() OVERRIDE {
- scoped_ptr<DelegatedFrameData> frame_no_filters =
- CreateFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1));
-
- scoped_ptr<DelegatedFrameData> frame_with_filters =
- CreateFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1));
-
- FilterOperations filters;
- filters.Append(FilterOperation::CreateGrayscaleFilter(0.5f));
- AddRenderPass(frame_with_filters.get(),
- RenderPass::Id(2, 1),
- gfx::Rect(0, 0, 1, 1),
- gfx::Rect(0, 0, 1, 1),
- filters,
- FilterOperations());
-
- SetFrameData(frame_no_filters.Pass());
- delegated_->RemoveFromParent();
- SetFrameData(frame_with_filters.Pass());
- layer_tree_host()->root_layer()->AddChild(delegated_);
-
- PostSetNeedsCommitToMainThread();
- }
-
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
- bool expect_context = !delegating_renderer();
- EXPECT_EQ(expect_context, !!host_impl->offscreen_context_provider());
- EndTest();
- }
-};
-
-SINGLE_AND_MULTI_THREAD_TEST_F(
- LayerTreeHostDelegatedTestOffscreenContext_Filters_AddedToTree);
-
class LayerTreeHostDelegatedTestLayerUsesFrameDamage
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698