OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
211 // LayerDelegate that paints colors to the layer. | 211 // LayerDelegate that paints colors to the layer. |
212 class TestLayerDelegate : public LayerDelegate { | 212 class TestLayerDelegate : public LayerDelegate { |
213 public: | 213 public: |
214 explicit TestLayerDelegate() { reset(); } | 214 explicit TestLayerDelegate() { reset(); } |
215 ~TestLayerDelegate() override {} | 215 ~TestLayerDelegate() override {} |
216 | 216 |
217 void AddColor(SkColor color) { | 217 void AddColor(SkColor color) { |
218 colors_.push_back(color); | 218 colors_.push_back(color); |
219 } | 219 } |
220 | 220 |
221 const gfx::Size& paint_size() const { return paint_size_; } | |
222 int color_index() const { return color_index_; } | 221 int color_index() const { return color_index_; } |
223 | 222 |
224 std::string ToScaleString() const { | |
225 return base::StringPrintf("%.1f %.1f", scale_x_, scale_y_); | |
226 } | |
227 | |
228 float device_scale_factor() const { | 223 float device_scale_factor() const { |
229 return device_scale_factor_; | 224 return device_scale_factor_; |
230 } | 225 } |
231 | 226 |
232 // Overridden from LayerDelegate: | 227 // Overridden from LayerDelegate: |
233 void OnPaintLayer(gfx::Canvas* canvas) override { | 228 void OnPaintLayer(gfx::Canvas* canvas) override { |
234 SkISize size = canvas->sk_canvas()->getBaseLayerSize(); | |
235 paint_size_ = gfx::Size(size.width(), size.height()); | |
236 canvas->DrawColor(colors_[color_index_]); | 229 canvas->DrawColor(colors_[color_index_]); |
237 color_index_ = (color_index_ + 1) % static_cast<int>(colors_.size()); | 230 color_index_ = (color_index_ + 1) % static_cast<int>(colors_.size()); |
238 const SkMatrix& matrix = canvas->sk_canvas()->getTotalMatrix(); | |
239 scale_x_ = matrix.getScaleX(); | |
240 scale_y_ = matrix.getScaleY(); | |
241 } | 231 } |
242 | 232 |
243 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override {} | 233 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override {} |
244 | 234 |
245 void OnDeviceScaleFactorChanged(float device_scale_factor) override { | 235 void OnDeviceScaleFactorChanged(float device_scale_factor) override { |
246 device_scale_factor_ = device_scale_factor; | 236 device_scale_factor_ = device_scale_factor; |
247 } | 237 } |
248 | 238 |
249 base::Closure PrepareForLayerBoundsChange() override { | 239 base::Closure PrepareForLayerBoundsChange() override { |
250 return base::Closure(); | 240 return base::Closure(); |
251 } | 241 } |
252 | 242 |
253 void reset() { | 243 void reset() { |
254 color_index_ = 0; | 244 color_index_ = 0; |
255 paint_size_.SetSize(0, 0); | |
256 scale_x_ = scale_y_ = 0.0f; | |
257 device_scale_factor_ = 0.0f; | 245 device_scale_factor_ = 0.0f; |
258 } | 246 } |
259 | 247 |
260 private: | 248 private: |
261 std::vector<SkColor> colors_; | 249 std::vector<SkColor> colors_; |
262 int color_index_; | 250 int color_index_; |
263 gfx::Size paint_size_; | |
264 float scale_x_; | |
265 float scale_y_; | |
266 float device_scale_factor_; | 251 float device_scale_factor_; |
267 | 252 |
268 DISALLOW_COPY_AND_ASSIGN(TestLayerDelegate); | 253 DISALLOW_COPY_AND_ASSIGN(TestLayerDelegate); |
269 }; | 254 }; |
270 | 255 |
271 // LayerDelegate that verifies that a layer was asked to update its canvas. | 256 // LayerDelegate that verifies that a layer was asked to update its canvas. |
272 class DrawTreeLayerDelegate : public LayerDelegate { | 257 class DrawTreeLayerDelegate : public LayerDelegate { |
273 public: | 258 public: |
274 DrawTreeLayerDelegate() : painted_(false) {} | 259 DrawTreeLayerDelegate() : painted_(false) {} |
275 ~DrawTreeLayerDelegate() override {} | 260 ~DrawTreeLayerDelegate() override {} |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
502 gfx::Point point1_in_l1_coords(25, 25); | 487 gfx::Point point1_in_l1_coords(25, 25); |
503 EXPECT_EQ(point1_in_l1_coords, point1_in_l3_coords); | 488 EXPECT_EQ(point1_in_l1_coords, point1_in_l3_coords); |
504 | 489 |
505 gfx::Point point2_in_l1_coords(5, 5); | 490 gfx::Point point2_in_l1_coords(5, 5); |
506 Layer::ConvertPointToLayer(l1.get(), l3.get(), &point2_in_l1_coords); | 491 Layer::ConvertPointToLayer(l1.get(), l3.get(), &point2_in_l1_coords); |
507 gfx::Point point2_in_l3_coords(-15, -15); | 492 gfx::Point point2_in_l3_coords(-15, -15); |
508 EXPECT_EQ(point2_in_l3_coords, point2_in_l1_coords); | 493 EXPECT_EQ(point2_in_l3_coords, point2_in_l1_coords); |
509 } | 494 } |
510 | 495 |
511 TEST_F(LayerWithRealCompositorTest, Delegate) { | 496 TEST_F(LayerWithRealCompositorTest, Delegate) { |
512 scoped_ptr<Layer> l1(CreateColorLayer(SK_ColorBLACK, | 497 scoped_ptr<Layer> l1( |
513 gfx::Rect(20, 20, 400, 400))); | 498 CreateColorLayer(SK_ColorBLACK, gfx::Rect(20, 20, 1000, 1000))); |
danakj
2015/03/06 21:12:40
no need to change this size now
| |
514 GetCompositor()->SetRootLayer(l1.get()); | 499 GetCompositor()->SetRootLayer(l1.get()); |
515 WaitForDraw(); | 500 WaitForDraw(); |
516 | 501 |
517 TestLayerDelegate delegate; | 502 TestLayerDelegate delegate; |
518 l1->set_delegate(&delegate); | 503 l1->set_delegate(&delegate); |
519 delegate.AddColor(SK_ColorWHITE); | 504 delegate.AddColor(SK_ColorWHITE); |
520 delegate.AddColor(SK_ColorYELLOW); | 505 delegate.AddColor(SK_ColorYELLOW); |
521 delegate.AddColor(SK_ColorGREEN); | 506 delegate.AddColor(SK_ColorGREEN); |
522 | 507 |
523 l1->SchedulePaint(gfx::Rect(0, 0, 400, 400)); | 508 l1->SchedulePaint(gfx::Rect(0, 0, 1000, 1000)); |
danakj
2015/03/06 21:12:40
can just SchedulePaint the same rect for each of t
| |
524 WaitForDraw(); | 509 WaitForDraw(); |
525 | 510 |
526 EXPECT_EQ(delegate.color_index(), 1); | 511 EXPECT_EQ(1, delegate.color_index()); |
527 EXPECT_EQ(delegate.paint_size(), l1->bounds().size()); | |
528 | 512 |
529 l1->SchedulePaint(gfx::Rect(10, 10, 200, 200)); | 513 gfx::Rect paint_rect = gfx::Rect(10, 10, 600, 600); |
514 l1->SchedulePaint(paint_rect); | |
530 WaitForDraw(); | 515 WaitForDraw(); |
531 EXPECT_EQ(delegate.color_index(), 2); | 516 EXPECT_EQ(2, delegate.color_index()); |
532 EXPECT_EQ(delegate.paint_size(), gfx::Size(200, 200)); | |
533 | 517 |
534 l1->SchedulePaint(gfx::Rect(5, 5, 50, 50)); | 518 paint_rect = gfx::Rect(5, 5, 50, 50); |
519 l1->SchedulePaint(paint_rect); | |
535 WaitForDraw(); | 520 WaitForDraw(); |
536 EXPECT_EQ(delegate.color_index(), 0); | 521 EXPECT_EQ(0, delegate.color_index()); |
537 EXPECT_EQ(delegate.paint_size(), gfx::Size(50, 50)); | |
538 } | 522 } |
539 | 523 |
540 TEST_F(LayerWithRealCompositorTest, DrawTree) { | 524 TEST_F(LayerWithRealCompositorTest, DrawTree) { |
541 scoped_ptr<Layer> l1(CreateColorLayer(SK_ColorRED, | 525 scoped_ptr<Layer> l1(CreateColorLayer(SK_ColorRED, |
542 gfx::Rect(20, 20, 400, 400))); | 526 gfx::Rect(20, 20, 400, 400))); |
543 scoped_ptr<Layer> l2(CreateColorLayer(SK_ColorBLUE, | 527 scoped_ptr<Layer> l2(CreateColorLayer(SK_ColorBLUE, |
544 gfx::Rect(10, 10, 350, 350))); | 528 gfx::Rect(10, 10, 350, 350))); |
545 scoped_ptr<Layer> l3(CreateColorLayer(SK_ColorYELLOW, | 529 scoped_ptr<Layer> l3(CreateColorLayer(SK_ColorYELLOW, |
546 gfx::Rect(10, 10, 100, 100))); | 530 gfx::Rect(10, 10, 100, 100))); |
547 l1->Add(l2.get()); | 531 l1->Add(l2.get()); |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1301 EXPECT_EQ("10,20 200x220", root->bounds().ToString()); | 1285 EXPECT_EQ("10,20 200x220", root->bounds().ToString()); |
1302 EXPECT_EQ("10,20 140x180", l1->bounds().ToString()); | 1286 EXPECT_EQ("10,20 140x180", l1->bounds().ToString()); |
1303 gfx::Size cc_bounds_size = root->cc_layer()->bounds(); | 1287 gfx::Size cc_bounds_size = root->cc_layer()->bounds(); |
1304 EXPECT_EQ("200x220", cc_bounds_size.ToString()); | 1288 EXPECT_EQ("200x220", cc_bounds_size.ToString()); |
1305 cc_bounds_size = l1->cc_layer()->bounds(); | 1289 cc_bounds_size = l1->cc_layer()->bounds(); |
1306 EXPECT_EQ("140x180", cc_bounds_size.ToString()); | 1290 EXPECT_EQ("140x180", cc_bounds_size.ToString()); |
1307 // No scale change, so no scale notification. | 1291 // No scale change, so no scale notification. |
1308 EXPECT_EQ(0.0f, root_delegate.device_scale_factor()); | 1292 EXPECT_EQ(0.0f, root_delegate.device_scale_factor()); |
1309 EXPECT_EQ(0.0f, l1_delegate.device_scale_factor()); | 1293 EXPECT_EQ(0.0f, l1_delegate.device_scale_factor()); |
1310 | 1294 |
1311 EXPECT_EQ("200x220", root_delegate.paint_size().ToString()); | |
1312 EXPECT_EQ("140x180", l1_delegate.paint_size().ToString()); | |
1313 | |
1314 // Scale up to 2.0. Changing scale doesn't change the bounds in DIP. | 1295 // Scale up to 2.0. Changing scale doesn't change the bounds in DIP. |
1315 GetCompositor()->SetScaleAndSize(2.0f, gfx::Size(500, 500)); | 1296 GetCompositor()->SetScaleAndSize(2.0f, gfx::Size(500, 500)); |
1316 EXPECT_EQ("10,20 200x220", root->bounds().ToString()); | 1297 EXPECT_EQ("10,20 200x220", root->bounds().ToString()); |
1317 EXPECT_EQ("10,20 140x180", l1->bounds().ToString()); | 1298 EXPECT_EQ("10,20 140x180", l1->bounds().ToString()); |
1318 // CC layer should still match the UI layer bounds. | 1299 // CC layer should still match the UI layer bounds. |
1319 cc_bounds_size = root->cc_layer()->bounds(); | 1300 cc_bounds_size = root->cc_layer()->bounds(); |
1320 EXPECT_EQ("200x220", cc_bounds_size.ToString()); | 1301 EXPECT_EQ("200x220", cc_bounds_size.ToString()); |
1321 cc_bounds_size = l1->cc_layer()->bounds(); | 1302 cc_bounds_size = l1->cc_layer()->bounds(); |
1322 EXPECT_EQ("140x180", cc_bounds_size.ToString()); | 1303 EXPECT_EQ("140x180", cc_bounds_size.ToString()); |
1323 // New scale factor must have been notified. | 1304 // New scale factor must have been notified. Make sure painting happens at |
1305 // right sacle. | |
danakj
2015/03/06 21:12:40
scale
| |
1324 EXPECT_EQ(2.0f, root_delegate.device_scale_factor()); | 1306 EXPECT_EQ(2.0f, root_delegate.device_scale_factor()); |
1325 EXPECT_EQ(2.0f, l1_delegate.device_scale_factor()); | 1307 EXPECT_EQ(2.0f, l1_delegate.device_scale_factor()); |
1326 | 1308 |
1327 // Canvas size must have been scaled down up. | |
1328 WaitForDraw(); | |
1329 EXPECT_EQ("400x440", root_delegate.paint_size().ToString()); | |
1330 EXPECT_EQ("2.0 2.0", root_delegate.ToScaleString()); | |
1331 EXPECT_EQ("280x360", l1_delegate.paint_size().ToString()); | |
1332 EXPECT_EQ("2.0 2.0", l1_delegate.ToScaleString()); | |
1333 | |
1334 // Scale down back to 1.0f. | 1309 // Scale down back to 1.0f. |
1335 GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(500, 500)); | 1310 GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(500, 500)); |
1336 EXPECT_EQ("10,20 200x220", root->bounds().ToString()); | 1311 EXPECT_EQ("10,20 200x220", root->bounds().ToString()); |
1337 EXPECT_EQ("10,20 140x180", l1->bounds().ToString()); | 1312 EXPECT_EQ("10,20 140x180", l1->bounds().ToString()); |
1338 // CC layer should still match the UI layer bounds. | 1313 // CC layer should still match the UI layer bounds. |
1339 cc_bounds_size = root->cc_layer()->bounds(); | 1314 cc_bounds_size = root->cc_layer()->bounds(); |
1340 EXPECT_EQ("200x220", cc_bounds_size.ToString()); | 1315 EXPECT_EQ("200x220", cc_bounds_size.ToString()); |
1341 cc_bounds_size = l1->cc_layer()->bounds(); | 1316 cc_bounds_size = l1->cc_layer()->bounds(); |
1342 EXPECT_EQ("140x180", cc_bounds_size.ToString()); | 1317 EXPECT_EQ("140x180", cc_bounds_size.ToString()); |
1343 // New scale factor must have been notified. | 1318 // New scale factor must have been notified. Make sure painting happens at |
1319 // right sacle. | |
danakj
2015/03/06 21:12:40
scale
| |
1344 EXPECT_EQ(1.0f, root_delegate.device_scale_factor()); | 1320 EXPECT_EQ(1.0f, root_delegate.device_scale_factor()); |
1345 EXPECT_EQ(1.0f, l1_delegate.device_scale_factor()); | 1321 EXPECT_EQ(1.0f, l1_delegate.device_scale_factor()); |
1346 | 1322 |
1347 // Canvas size must have been scaled down too. | |
1348 WaitForDraw(); | |
1349 EXPECT_EQ("200x220", root_delegate.paint_size().ToString()); | |
1350 EXPECT_EQ("1.0 1.0", root_delegate.ToScaleString()); | |
1351 EXPECT_EQ("140x180", l1_delegate.paint_size().ToString()); | |
1352 EXPECT_EQ("1.0 1.0", l1_delegate.ToScaleString()); | |
1353 | |
1354 root_delegate.reset(); | 1323 root_delegate.reset(); |
1355 l1_delegate.reset(); | 1324 l1_delegate.reset(); |
1356 // Just changing the size shouldn't notify the scale change nor | 1325 // Just changing the size shouldn't notify the scale change nor |
1357 // trigger repaint. | 1326 // trigger repaint. |
1358 GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(1000, 1000)); | 1327 GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(1000, 1000)); |
1359 // No scale change, so no scale notification. | 1328 // No scale change, so no scale notification. |
1360 EXPECT_EQ(0.0f, root_delegate.device_scale_factor()); | 1329 EXPECT_EQ(0.0f, root_delegate.device_scale_factor()); |
1361 EXPECT_EQ(0.0f, l1_delegate.device_scale_factor()); | 1330 EXPECT_EQ(0.0f, l1_delegate.device_scale_factor()); |
1362 WaitForDraw(); | |
1363 EXPECT_EQ("0x0", root_delegate.paint_size().ToString()); | |
1364 EXPECT_EQ("0.0 0.0", root_delegate.ToScaleString()); | |
1365 EXPECT_EQ("0x0", l1_delegate.paint_size().ToString()); | |
1366 EXPECT_EQ("0.0 0.0", l1_delegate.ToScaleString()); | |
1367 } | 1331 } |
1368 | 1332 |
1369 TEST_F(LayerWithRealCompositorTest, ScaleReparent) { | 1333 TEST_F(LayerWithRealCompositorTest, ScaleReparent) { |
1370 scoped_ptr<Layer> root(CreateColorLayer(SK_ColorWHITE, | 1334 scoped_ptr<Layer> root(CreateColorLayer(SK_ColorWHITE, |
1371 gfx::Rect(10, 20, 200, 220))); | 1335 gfx::Rect(10, 20, 200, 220))); |
1372 scoped_ptr<Layer> l1(CreateColorLayer(SK_ColorWHITE, | 1336 scoped_ptr<Layer> l1(CreateColorLayer(SK_ColorWHITE, |
1373 gfx::Rect(10, 20, 140, 180))); | 1337 gfx::Rect(10, 20, 140, 180))); |
1374 TestLayerDelegate l1_delegate; | 1338 TestLayerDelegate l1_delegate; |
1375 l1_delegate.AddColor(SK_ColorWHITE); | 1339 l1_delegate.AddColor(SK_ColorWHITE); |
1376 l1->set_delegate(&l1_delegate); | 1340 l1->set_delegate(&l1_delegate); |
1377 | 1341 |
1378 GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(500, 500)); | 1342 GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(500, 500)); |
1379 GetCompositor()->SetRootLayer(root.get()); | 1343 GetCompositor()->SetRootLayer(root.get()); |
1380 WaitForDraw(); | |
1381 | 1344 |
1382 root->Add(l1.get()); | 1345 root->Add(l1.get()); |
1383 EXPECT_EQ("10,20 140x180", l1->bounds().ToString()); | 1346 EXPECT_EQ("10,20 140x180", l1->bounds().ToString()); |
1384 gfx::Size cc_bounds_size = l1->cc_layer()->bounds(); | 1347 gfx::Size cc_bounds_size = l1->cc_layer()->bounds(); |
1385 EXPECT_EQ("140x180", cc_bounds_size.ToString()); | 1348 EXPECT_EQ("140x180", cc_bounds_size.ToString()); |
1386 EXPECT_EQ(0.0f, l1_delegate.device_scale_factor()); | 1349 EXPECT_EQ(0.0f, l1_delegate.device_scale_factor()); |
1387 | 1350 |
1388 WaitForDraw(); | |
1389 EXPECT_EQ("140x180", l1_delegate.paint_size().ToString()); | |
1390 EXPECT_EQ("1.0 1.0", l1_delegate.ToScaleString()); | |
1391 | |
1392 // Remove l1 from root and change the scale. | 1351 // Remove l1 from root and change the scale. |
1393 root->Remove(l1.get()); | 1352 root->Remove(l1.get()); |
1394 EXPECT_EQ(NULL, l1->parent()); | 1353 EXPECT_EQ(NULL, l1->parent()); |
1395 EXPECT_EQ(NULL, l1->GetCompositor()); | 1354 EXPECT_EQ(NULL, l1->GetCompositor()); |
1396 GetCompositor()->SetScaleAndSize(2.0f, gfx::Size(500, 500)); | 1355 GetCompositor()->SetScaleAndSize(2.0f, gfx::Size(500, 500)); |
1397 // Sanity check on root and l1. | 1356 // Sanity check on root and l1. |
1398 EXPECT_EQ("10,20 200x220", root->bounds().ToString()); | 1357 EXPECT_EQ("10,20 200x220", root->bounds().ToString()); |
1399 cc_bounds_size = l1->cc_layer()->bounds(); | 1358 cc_bounds_size = l1->cc_layer()->bounds(); |
1400 EXPECT_EQ("140x180", cc_bounds_size.ToString()); | 1359 EXPECT_EQ("140x180", cc_bounds_size.ToString()); |
1401 | 1360 |
1402 root->Add(l1.get()); | 1361 root->Add(l1.get()); |
1403 EXPECT_EQ("10,20 140x180", l1->bounds().ToString()); | 1362 EXPECT_EQ("10,20 140x180", l1->bounds().ToString()); |
1404 cc_bounds_size = l1->cc_layer()->bounds(); | 1363 cc_bounds_size = l1->cc_layer()->bounds(); |
1405 EXPECT_EQ("140x180", cc_bounds_size.ToString()); | 1364 EXPECT_EQ("140x180", cc_bounds_size.ToString()); |
1406 EXPECT_EQ(2.0f, l1_delegate.device_scale_factor()); | 1365 EXPECT_EQ(2.0f, l1_delegate.device_scale_factor()); |
1407 WaitForDraw(); | |
1408 EXPECT_EQ("280x360", l1_delegate.paint_size().ToString()); | |
1409 EXPECT_EQ("2.0 2.0", l1_delegate.ToScaleString()); | |
1410 } | 1366 } |
1411 | 1367 |
1412 // Verifies that when changing bounds on a layer that is invisible, and then | 1368 // Verifies that when changing bounds on a layer that is invisible, and then |
1413 // made visible, the right thing happens: | 1369 // made visible, the right thing happens: |
1414 // - if just a move, then no painting should happen. | 1370 // - if just a move, then no painting should happen. |
1415 // - if a resize, the layer should be repainted. | 1371 // - if a resize, the layer should be repainted. |
1416 TEST_F(LayerWithDelegateTest, SetBoundsWhenInvisible) { | 1372 TEST_F(LayerWithDelegateTest, SetBoundsWhenInvisible) { |
1417 scoped_ptr<Layer> root(CreateNoTextureLayer(gfx::Rect(0, 0, 1000, 1000))); | 1373 scoped_ptr<Layer> root(CreateNoTextureLayer(gfx::Rect(0, 0, 1000, 1000))); |
1418 | 1374 |
1419 scoped_ptr<Layer> child(CreateLayer(LAYER_TEXTURED)); | 1375 scoped_ptr<Layer> child(CreateLayer(LAYER_TEXTURED)); |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1766 MakeFrameData(gfx::Size(10, 10)))); | 1722 MakeFrameData(gfx::Size(10, 10)))); |
1767 layer->SetShowDelegatedContent(frame_provider.get(), gfx::Size(10, 10)); | 1723 layer->SetShowDelegatedContent(frame_provider.get(), gfx::Size(10, 10)); |
1768 | 1724 |
1769 EXPECT_FALSE(delegate.delegated_frame_damage_called()); | 1725 EXPECT_FALSE(delegate.delegated_frame_damage_called()); |
1770 layer->OnDelegatedFrameDamage(damage_rect); | 1726 layer->OnDelegatedFrameDamage(damage_rect); |
1771 EXPECT_TRUE(delegate.delegated_frame_damage_called()); | 1727 EXPECT_TRUE(delegate.delegated_frame_damage_called()); |
1772 EXPECT_EQ(damage_rect, delegate.delegated_frame_damage_rect()); | 1728 EXPECT_EQ(damage_rect, delegate.delegated_frame_damage_rect()); |
1773 } | 1729 } |
1774 | 1730 |
1775 } // namespace ui | 1731 } // namespace ui |
OLD | NEW |