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

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

Issue 2128113002: Use a cc::Display for WebView resourceless software draws. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: displaywebview: mojom Created 4 years, 5 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 9629 matching lines...) Expand 10 before | Expand all | Expand 10 after
9640 did_request_redraw_ = false; 9640 did_request_redraw_ = false;
9641 host_impl_->OnDraw(draw_transform, draw_viewport2, clip, 9641 host_impl_->OnDraw(draw_transform, draw_viewport2, clip,
9642 resourceless_software_draw); 9642 resourceless_software_draw);
9643 EXPECT_TRUE(did_request_redraw_); 9643 EXPECT_TRUE(did_request_redraw_);
9644 EXPECT_FALSE(last_on_draw_frame_->has_no_damage); 9644 EXPECT_FALSE(last_on_draw_frame_->has_no_damage);
9645 } 9645 }
9646 9646
9647 class ResourcelessSoftwareLayerTreeHostImplTest : public LayerTreeHostImplTest { 9647 class ResourcelessSoftwareLayerTreeHostImplTest : public LayerTreeHostImplTest {
9648 protected: 9648 protected:
9649 std::unique_ptr<OutputSurface> CreateOutputSurface() override { 9649 std::unique_ptr<OutputSurface> CreateOutputSurface() override {
9650 return FakeOutputSurface::Create3dWithResourcelessSoftwareSupport(); 9650 return FakeOutputSurface::CreateDelegating3d();
9651 } 9651 }
9652 }; 9652 };
9653 9653
9654 TEST_F(ResourcelessSoftwareLayerTreeHostImplTest, 9654 TEST_F(ResourcelessSoftwareLayerTreeHostImplTest,
9655 ResourcelessSoftwareSetNeedsRedraw) { 9655 ResourcelessSoftwareSetNeedsRedraw) {
9656 SetupRootLayerImpl(LayerImpl::Create(host_impl_->active_tree(), 1)); 9656 SetupRootLayerImpl(LayerImpl::Create(host_impl_->active_tree(), 1));
9657 host_impl_->active_tree()->BuildPropertyTreesForTesting(); 9657 host_impl_->active_tree()->BuildPropertyTreesForTesting();
9658 9658
9659 const gfx::Size viewport_size(100, 100); 9659 const gfx::Size viewport_size(100, 100);
9660 host_impl_->SetViewportSize(viewport_size); 9660 host_impl_->SetViewportSize(viewport_size);
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
11044 11044
11045 // Re-initialize with a software output surface. 11045 // Re-initialize with a software output surface.
11046 output_surface_ = FakeOutputSurface::CreateSoftware( 11046 output_surface_ = FakeOutputSurface::CreateSoftware(
11047 base::WrapUnique(new SoftwareOutputDevice)); 11047 base::WrapUnique(new SoftwareOutputDevice));
11048 host_impl_->InitializeRenderer(output_surface_.get()); 11048 host_impl_->InitializeRenderer(output_surface_.get());
11049 EXPECT_FALSE(host_impl_->use_gpu_rasterization()); 11049 EXPECT_FALSE(host_impl_->use_gpu_rasterization());
11050 } 11050 }
11051 11051
11052 } // namespace 11052 } // namespace
11053 } // namespace cc 11053 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | content/renderer/android/synchronous_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698