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

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

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 7287 matching lines...) Expand 10 before | Expand all | Expand 10 after
7298 EXPECT_EQ(0, software_device->frames_began_); 7298 EXPECT_EQ(0, software_device->frames_began_);
7299 EXPECT_EQ(0, software_device->frames_ended_); 7299 EXPECT_EQ(0, software_device->frames_ended_);
7300 7300
7301 host_impl_->OnDraw(external_transform, external_viewport, external_clip, 7301 host_impl_->OnDraw(external_transform, external_viewport, external_clip,
7302 resourceless_software_draw); 7302 resourceless_software_draw);
7303 7303
7304 EXPECT_EQ(1, software_device->frames_began_); 7304 EXPECT_EQ(1, software_device->frames_began_);
7305 EXPECT_EQ(1, software_device->frames_ended_); 7305 EXPECT_EQ(1, software_device->frames_ended_);
7306 7306
7307 // Call another API method that is likely to hit nullptr in this mode. 7307 // Call another API method that is likely to hit nullptr in this mode.
7308 scoped_refptr<base::trace_event::TracedValue> state = 7308 scoped_ptr<base::trace_event::TracedValue> state(
7309 make_scoped_refptr(new base::trace_event::TracedValue()); 7309 new base::trace_event::TracedValue());
7310 host_impl_->ActivationStateAsValueInto(state.get()); 7310 host_impl_->ActivationStateAsValueInto(state.get());
7311 } 7311 }
7312 7312
7313 TEST_F(LayerTreeHostImplTest, 7313 TEST_F(LayerTreeHostImplTest,
7314 ForcedDrawToSoftwareDeviceSkipsUnsupportedLayers) { 7314 ForcedDrawToSoftwareDeviceSkipsUnsupportedLayers) {
7315 set_reduce_memory_result(false); 7315 set_reduce_memory_result(false);
7316 EXPECT_TRUE(CreateHostImpl(DefaultSettings(), 7316 EXPECT_TRUE(CreateHostImpl(DefaultSettings(),
7317 FakeOutputSurface::CreateSoftware( 7317 FakeOutputSurface::CreateSoftware(
7318 make_scoped_ptr(new CountingSoftwareDevice)))); 7318 make_scoped_ptr(new CountingSoftwareDevice))));
7319 7319
(...skipping 2814 matching lines...) Expand 10 before | Expand all | Expand 10 after
10134 // There should not be any jitter measured till we hit the fixed point hits 10134 // There should not be any jitter measured till we hit the fixed point hits
10135 // threshold. 10135 // threshold.
10136 float expected_jitter = 10136 float expected_jitter =
10137 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; 10137 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0;
10138 EXPECT_EQ(jitter, expected_jitter); 10138 EXPECT_EQ(jitter, expected_jitter);
10139 } 10139 }
10140 } 10140 }
10141 10141
10142 } // namespace 10142 } // namespace
10143 } // namespace cc 10143 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698