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

Side by Side Diff: cc/resources/picture_pile_unittest.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/resources/picture_pile_impl.cc ('k') | cc/resources/platform_color_unittest.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 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 <map> 5 #include <map>
6 #include <utility> 6 #include <utility>
7 7
8 #include "cc/resources/picture_pile.h" 8 #include "cc/resources/picture_pile.h"
9 #include "cc/test/fake_content_layer_client.h" 9 #include "cc/test/fake_content_layer_client.h"
10 #include "cc/test/fake_picture_pile.h" 10 #include "cc/test/fake_picture_pile.h"
(...skipping 24 matching lines...) Expand all
35 UpdateAndExpandInvalidation(&invalidation, tiling_size, viewport_rect); 35 UpdateAndExpandInvalidation(&invalidation, tiling_size, viewport_rect);
36 } 36 }
37 37
38 gfx::Size tiling_size() const { return pile_.GetSize(); } 38 gfx::Size tiling_size() const { return pile_.GetSize(); }
39 gfx::Rect tiling_rect() const { return gfx::Rect(pile_.GetSize()); } 39 gfx::Rect tiling_rect() const { return gfx::Rect(pile_.GetSize()); }
40 40
41 bool UpdateAndExpandInvalidation(Region* invalidation, 41 bool UpdateAndExpandInvalidation(Region* invalidation,
42 const gfx::Size& layer_size, 42 const gfx::Size& layer_size,
43 const gfx::Rect& visible_layer_rect) { 43 const gfx::Rect& visible_layer_rect) {
44 frame_number_++; 44 frame_number_++;
45 return pile_.UpdateAndExpandInvalidation(&client_, invalidation, layer_size, 45 return pile_.UpdateAndExpandInvalidation(
46 visible_layer_rect, frame_number_, 46 &client_, invalidation, false, layer_size, visible_layer_rect,
47 RecordingSource::RECORD_NORMALLY); 47 frame_number_, RecordingSource::RECORD_NORMALLY);
48 } 48 }
49 49
50 bool UpdateWholePile() { 50 bool UpdateWholePile() {
51 Region invalidation = tiling_rect(); 51 Region invalidation = tiling_rect();
52 bool result = UpdateAndExpandInvalidation(&invalidation, tiling_size(), 52 bool result = UpdateAndExpandInvalidation(&invalidation, tiling_size(),
53 tiling_rect()); 53 tiling_rect());
54 EXPECT_EQ(tiling_rect().ToString(), invalidation.ToString()); 54 EXPECT_EQ(tiling_rect().ToString(), invalidation.ToString());
55 return result; 55 return result;
56 } 56 }
57 57
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 EXPECT_TRUE(pile_.HasRecordings()); 1538 EXPECT_TRUE(pile_.HasRecordings());
1539 pile_.SetEmptyBounds(); 1539 pile_.SetEmptyBounds();
1540 EXPECT_FALSE(pile_.is_solid_color()); 1540 EXPECT_FALSE(pile_.is_solid_color());
1541 EXPECT_TRUE(pile_.GetSize().IsEmpty()); 1541 EXPECT_TRUE(pile_.GetSize().IsEmpty());
1542 EXPECT_TRUE(pile_.picture_map().empty()); 1542 EXPECT_TRUE(pile_.picture_map().empty());
1543 EXPECT_FALSE(pile_.HasRecordings()); 1543 EXPECT_FALSE(pile_.HasRecordings());
1544 } 1544 }
1545 1545
1546 } // namespace 1546 } // namespace
1547 } // namespace cc 1547 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile_impl.cc ('k') | cc/resources/platform_color_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698