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

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

Issue 514123002: Manual fixups in compositor code scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 6 years, 3 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
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/trees/layer_tree_host_unittest_no_message_loop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 5641 matching lines...) Expand 10 before | Expand all | Expand 10 after
5652 TEST_F(LayerTreeHostImplTestDeferredInitialize, Success) { 5652 TEST_F(LayerTreeHostImplTestDeferredInitialize, Success) {
5653 // Software draw. 5653 // Software draw.
5654 DrawFrame(); 5654 DrawFrame();
5655 5655
5656 EXPECT_FALSE(host_impl_->output_surface()->context_provider()); 5656 EXPECT_FALSE(host_impl_->output_surface()->context_provider());
5657 5657
5658 // DeferredInitialize and hardware draw. 5658 // DeferredInitialize and hardware draw.
5659 did_update_renderer_capabilities_ = false; 5659 did_update_renderer_capabilities_ = false;
5660 EXPECT_TRUE( 5660 EXPECT_TRUE(
5661 output_surface_->InitializeAndSetContext3d(onscreen_context_provider_)); 5661 output_surface_->InitializeAndSetContext3d(onscreen_context_provider_));
5662 EXPECT_EQ(onscreen_context_provider_, 5662 EXPECT_EQ(onscreen_context_provider_.get(),
5663 host_impl_->output_surface()->context_provider()); 5663 host_impl_->output_surface()->context_provider());
5664 EXPECT_TRUE(did_update_renderer_capabilities_); 5664 EXPECT_TRUE(did_update_renderer_capabilities_);
5665 5665
5666 // Defer intialized GL draw. 5666 // Defer intialized GL draw.
5667 DrawFrame(); 5667 DrawFrame();
5668 5668
5669 // Revert back to software. 5669 // Revert back to software.
5670 did_update_renderer_capabilities_ = false; 5670 did_update_renderer_capabilities_ = false;
5671 output_surface_->ReleaseGL(); 5671 output_surface_->ReleaseGL();
5672 EXPECT_FALSE(host_impl_->output_surface()->context_provider()); 5672 EXPECT_FALSE(host_impl_->output_surface()->context_provider());
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
6979 // surface. 6979 // surface.
6980 EXPECT_EQ(0, num_lost_surfaces_); 6980 EXPECT_EQ(0, num_lost_surfaces_);
6981 host_impl_->DidLoseOutputSurface(); 6981 host_impl_->DidLoseOutputSurface();
6982 EXPECT_EQ(1, num_lost_surfaces_); 6982 EXPECT_EQ(1, num_lost_surfaces_);
6983 host_impl_->DidLoseOutputSurface(); 6983 host_impl_->DidLoseOutputSurface();
6984 EXPECT_LE(1, num_lost_surfaces_); 6984 EXPECT_LE(1, num_lost_surfaces_);
6985 } 6985 }
6986 6986
6987 } // namespace 6987 } // namespace
6988 } // namespace cc 6988 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/trees/layer_tree_host_unittest_no_message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698