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

Side by Side Diff: cc/test/layer_tree_json_parser.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/test/fake_picture_pile_impl.cc ('k') | cc/test/layer_tree_pixel_test.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/layer_tree_json_parser.h" 5 #include "cc/test/layer_tree_json_parser.h"
6 6
7 #include "base/test/values_test_util.h" 7 #include "base/test/values_test_util.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "cc/layers/content_layer.h" 9 #include "cc/layers/content_layer.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 new_layer->SetTouchEventHandlerRegion(touch_region); 149 new_layer->SetTouchEventHandlerRegion(touch_region);
150 } 150 }
151 151
152 if (dict->HasKey("ScrollBlocksOn")) { 152 if (dict->HasKey("ScrollBlocksOn")) {
153 success &= dict->GetList("ScrollBlocksOn", &list); 153 success &= dict->GetList("ScrollBlocksOn", &list);
154 ScrollBlocksOn blocks; 154 ScrollBlocksOn blocks;
155 std::string str; 155 std::string str;
156 for (size_t i = 0; i < list->GetSize(); i++) { 156 for (size_t i = 0; i < list->GetSize(); i++) {
157 success &= list->GetString(i, &str); 157 success &= list->GetString(i, &str);
158 if (str == "StartTouch") 158 if (str == "StartTouch")
159 blocks |= SCROLL_BLOCKS_ON_START_TOUCH; 159 blocks |= ScrollBlocksOnStartTouch;
160 else if (str == "WheelEvent") 160 else if (str == "WheelEvent")
161 blocks |= SCROLL_BLOCKS_ON_WHEEL_EVENT; 161 blocks |= ScrollBlocksOnWheelEvent;
162 else if (str == "ScrollEvent") 162 else if (str == "ScrollEvent")
163 blocks |= SCROLL_BLOCKS_ON_SCROLL_EVENT; 163 blocks |= ScrollBlocksOnScrollEvent;
164 else 164 else
165 success = false; 165 success = false;
166 } 166 }
167 } 167 }
168 168
169 success &= dict->GetList("DrawTransform", &list); 169 success &= dict->GetList("DrawTransform", &list);
170 double transform[16]; 170 double transform[16];
171 for (int i = 0; i < 16; ++i) 171 for (int i = 0; i < 16; ++i)
172 success &= list->GetDouble(i, &transform[i]); 172 success &= list->GetDouble(i, &transform[i]);
173 173
(...skipping 15 matching lines...) Expand all
189 189
190 } // namespace 190 } // namespace
191 191
192 scoped_refptr<Layer> ParseTreeFromJson(std::string json, 192 scoped_refptr<Layer> ParseTreeFromJson(std::string json,
193 ContentLayerClient* content_client) { 193 ContentLayerClient* content_client) {
194 scoped_ptr<base::Value> val = base::test::ParseJson(json); 194 scoped_ptr<base::Value> val = base::test::ParseJson(json);
195 return ParseTreeFromValue(val.get(), content_client); 195 return ParseTreeFromValue(val.get(), content_client);
196 } 196 }
197 197
198 } // namespace cc 198 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_picture_pile_impl.cc ('k') | cc/test/layer_tree_pixel_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698