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

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

Issue 1312123005: cc: Fix use-after-free in test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt » ('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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 2017
2018 class LayerTreeHostTestAbortedCommitDoesntStallSynchronousCompositor 2018 class LayerTreeHostTestAbortedCommitDoesntStallSynchronousCompositor
2019 : public LayerTreeHostTestAbortedCommitDoesntStall { 2019 : public LayerTreeHostTestAbortedCommitDoesntStall {
2020 protected: 2020 protected:
2021 void InitializeSettings(LayerTreeSettings* settings) override { 2021 void InitializeSettings(LayerTreeSettings* settings) override {
2022 LayerTreeHostTestAbortedCommitDoesntStall::InitializeSettings(settings); 2022 LayerTreeHostTestAbortedCommitDoesntStall::InitializeSettings(settings);
2023 settings->using_synchronous_renderer_compositor = true; 2023 settings->using_synchronous_renderer_compositor = true;
2024 } 2024 }
2025 2025
2026 void ScheduledActionInvalidateOutputSurface() override { 2026 void ScheduledActionInvalidateOutputSurface() override {
2027 ImplThreadTaskRunner()->PostTask( 2027 base::ThreadTaskRunnerHandle::Get()->PostTask(
danakj 2015/08/28 23:59:23 Could you just early out if TestEnded() ?
sunnyps 2015/08/29 00:08:26 Done.
2028 FROM_HERE, 2028 FROM_HERE,
2029 base::Bind( 2029 base::Bind(
2030 &LayerTreeHostTestAbortedCommitDoesntStallSynchronousCompositor:: 2030 &LayerTreeHostTestAbortedCommitDoesntStallSynchronousCompositor::
2031 CallOnDraw, 2031 CallOnDraw,
2032 base::Unretained(this))); 2032 base::Unretained(this)));
2033 } 2033 }
2034 2034
2035 void CallOnDraw() { 2035 void CallOnDraw() {
2036 // Synchronous compositor does not draw unless told to do so by the output 2036 // Synchronous compositor does not draw unless told to do so by the output
2037 // surface. 2037 // surface.
(...skipping 4167 matching lines...) Expand 10 before | Expand all | Expand 10 after
6205 ScrollAndScaleSet scale_info_; 6205 ScrollAndScaleSet scale_info_;
6206 ScrollAndScaleSet no_op_info_; 6206 ScrollAndScaleSet no_op_info_;
6207 bool requested_update_layers_; 6207 bool requested_update_layers_;
6208 int commit_count_; 6208 int commit_count_;
6209 }; 6209 };
6210 6210
6211 MULTI_THREAD_TEST_F(LayerTreeHostScrollingAndScalingUpdatesLayers); 6211 MULTI_THREAD_TEST_F(LayerTreeHostScrollingAndScalingUpdatesLayers);
6212 6212
6213 } // namespace 6213 } // namespace
6214 } // namespace cc 6214 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698