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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2194013002: cc: Delete the Renderer base class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dcheck-delegating
Patch Set: delete-renderer-base-class: rebase Created 4 years, 4 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 7351 matching lines...) Expand 10 before | Expand all | Expand 10 after
7362 { 7362 {
7363 const auto& root_pass = frame.render_passes.back(); 7363 const auto& root_pass = frame.render_passes.back();
7364 ASSERT_EQ(1u, root_pass->quad_list.size()); 7364 ASSERT_EQ(1u, root_pass->quad_list.size());
7365 EXPECT_EQ(DrawQuad::SOLID_COLOR, root_pass->quad_list.front()->material); 7365 EXPECT_EQ(DrawQuad::SOLID_COLOR, root_pass->quad_list.front()->material);
7366 } 7366 }
7367 host_impl_->DrawLayers(&frame); 7367 host_impl_->DrawLayers(&frame);
7368 host_impl_->DidDrawAllLayers(frame); 7368 host_impl_->DidDrawAllLayers(frame);
7369 host_impl_->SwapBuffers(frame); 7369 host_impl_->SwapBuffers(frame);
7370 7370
7371 // Cause damage so we would draw something if possible. 7371 // Cause damage so we would draw something if possible.
7372 host_impl_->SetFullRootLayerDamage(); 7372 host_impl_->SetFullViewportDamage();
7373 7373
7374 // Verify no quads are drawn when transparent background is set. 7374 // Verify no quads are drawn when transparent background is set.
7375 host_impl_->active_tree()->set_has_transparent_background(true); 7375 host_impl_->active_tree()->set_has_transparent_background(true);
7376 host_impl_->SetFullRootLayerDamage(); 7376 host_impl_->SetFullViewportDamage();
7377 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); 7377 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame));
7378 { 7378 {
7379 const auto& root_pass = frame.render_passes.back(); 7379 const auto& root_pass = frame.render_passes.back();
7380 ASSERT_EQ(0u, root_pass->quad_list.size()); 7380 ASSERT_EQ(0u, root_pass->quad_list.size());
7381 } 7381 }
7382 host_impl_->DrawLayers(&frame); 7382 host_impl_->DrawLayers(&frame);
7383 host_impl_->DidDrawAllLayers(frame); 7383 host_impl_->DidDrawAllLayers(frame);
7384 host_impl_->SwapBuffers(frame); 7384 host_impl_->SwapBuffers(frame);
7385 } 7385 }
7386 7386
(...skipping 3401 matching lines...) Expand 10 before | Expand all | Expand 10 after
10788 EXPECT_TRUE(host_impl_->use_gpu_rasterization()); 10788 EXPECT_TRUE(host_impl_->use_gpu_rasterization());
10789 10789
10790 // Re-initialize with a software output surface. 10790 // Re-initialize with a software output surface.
10791 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware(); 10791 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware();
10792 host_impl_->InitializeRenderer(output_surface_.get()); 10792 host_impl_->InitializeRenderer(output_surface_.get());
10793 EXPECT_FALSE(host_impl_->use_gpu_rasterization()); 10793 EXPECT_FALSE(host_impl_->use_gpu_rasterization());
10794 } 10794 }
10795 10795
10796 } // namespace 10796 } // namespace
10797 } // namespace cc 10797 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698