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

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

Issue 2321883002: cc: Remove SetMemoryPolicy from OutputSurface and Display. (Closed)
Patch Set: nits Created 4 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/trees/layer_tree_settings.cc ('k') | cc/trees/proxy_impl.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/proxy_common.h" 5 #include "cc/trees/proxy_common.h"
6 6
7 #include "cc/proto/begin_main_frame_and_commit_state.pb.h" 7 #include "cc/proto/begin_main_frame_and_commit_state.pb.h"
8 #include "cc/test/begin_frame_args_test.h" 8 #include "cc/test/begin_frame_args_test.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 18 matching lines...) Expand all
29 scroll2.scroll_delta = gfx::Vector2d(1, 5); 29 scroll2.scroll_delta = gfx::Vector2d(1, 5);
30 begin_main_frame_state.scroll_info.reset(new ScrollAndScaleSet()); 30 begin_main_frame_state.scroll_info.reset(new ScrollAndScaleSet());
31 begin_main_frame_state.scroll_info->scrolls.push_back(scroll1); 31 begin_main_frame_state.scroll_info->scrolls.push_back(scroll1);
32 begin_main_frame_state.scroll_info->scrolls.push_back(scroll2); 32 begin_main_frame_state.scroll_info->scrolls.push_back(scroll2);
33 33
34 begin_main_frame_state.scroll_info->page_scale_delta = 0.3f; 34 begin_main_frame_state.scroll_info->page_scale_delta = 0.3f;
35 begin_main_frame_state.scroll_info->elastic_overscroll_delta = 35 begin_main_frame_state.scroll_info->elastic_overscroll_delta =
36 gfx::Vector2dF(0.5f, 0.6f); 36 gfx::Vector2dF(0.5f, 0.6f);
37 begin_main_frame_state.scroll_info->top_controls_delta = 0.9f; 37 begin_main_frame_state.scroll_info->top_controls_delta = 0.9f;
38 38
39 begin_main_frame_state.memory_allocation_limit_bytes = 16;
40 begin_main_frame_state.evicted_ui_resources = false; 39 begin_main_frame_state.evicted_ui_resources = false;
41 40
42 proto::BeginMainFrameAndCommitState proto; 41 proto::BeginMainFrameAndCommitState proto;
43 begin_main_frame_state.ToProtobuf(&proto); 42 begin_main_frame_state.ToProtobuf(&proto);
44 43
45 BeginMainFrameAndCommitState new_begin_main_frame_state; 44 BeginMainFrameAndCommitState new_begin_main_frame_state;
46 new_begin_main_frame_state.FromProtobuf(proto); 45 new_begin_main_frame_state.FromProtobuf(proto);
47 46
48 EXPECT_EQ(new_begin_main_frame_state.begin_frame_id, 47 EXPECT_EQ(new_begin_main_frame_state.begin_frame_id,
49 begin_main_frame_state.begin_frame_id); 48 begin_main_frame_state.begin_frame_id);
50 EXPECT_EQ(new_begin_main_frame_state.begin_frame_args, 49 EXPECT_EQ(new_begin_main_frame_state.begin_frame_args,
51 begin_main_frame_state.begin_frame_args); 50 begin_main_frame_state.begin_frame_args);
52 EXPECT_TRUE(begin_main_frame_state.scroll_info->EqualsForTesting( 51 EXPECT_TRUE(begin_main_frame_state.scroll_info->EqualsForTesting(
53 *new_begin_main_frame_state.scroll_info.get())); 52 *new_begin_main_frame_state.scroll_info.get()));
54 EXPECT_EQ(new_begin_main_frame_state.memory_allocation_limit_bytes,
55 begin_main_frame_state.memory_allocation_limit_bytes);
56 EXPECT_EQ(new_begin_main_frame_state.evicted_ui_resources, 53 EXPECT_EQ(new_begin_main_frame_state.evicted_ui_resources,
57 begin_main_frame_state.evicted_ui_resources); 54 begin_main_frame_state.evicted_ui_resources);
58 } 55 }
59 56
60 } // namespace 57 } // namespace
61 } // namespace cc 58 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | cc/trees/proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698