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

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

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl 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.h ('k') | cc/test/fake_picture_pile_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/fake_picture_pile.h" 5 #include "cc/test/fake_picture_pile.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "cc/test/fake_picture_pile_impl.h" 9 #include "cc/test/fake_picture_pile_impl.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 return CreatePile(tile_size, layer_bounds, is_filled); 42 return CreatePile(tile_size, layer_bounds, is_filled);
43 } 43 }
44 44
45 scoped_ptr<FakePicturePile> FakePicturePile::CreateEmptyPile( 45 scoped_ptr<FakePicturePile> FakePicturePile::CreateEmptyPile(
46 const gfx::Size& tile_size, 46 const gfx::Size& tile_size,
47 const gfx::Size& layer_bounds) { 47 const gfx::Size& layer_bounds) {
48 bool is_filled = false; 48 bool is_filled = false;
49 return CreatePile(tile_size, layer_bounds, is_filled); 49 return CreatePile(tile_size, layer_bounds, is_filled);
50 } 50 }
51 51
52 scoped_refptr<RasterSource> FakePicturePile::CreateRasterSource() const { 52 scoped_refptr<RasterSource> FakePicturePile::CreateRasterSource(
53 bool can_use_lcd_text) const {
53 return FakePicturePileImpl::CreateFromPile(this, playback_allowed_event_); 54 return FakePicturePileImpl::CreateFromPile(this, playback_allowed_event_);
54 } 55 }
55 56
56 void FakePicturePile::AddRecordingAt(int x, int y) { 57 void FakePicturePile::AddRecordingAt(int x, int y) {
57 EXPECT_GE(x, 0); 58 EXPECT_GE(x, 0);
58 EXPECT_GE(y, 0); 59 EXPECT_GE(y, 0);
59 EXPECT_LT(x, tiling_.num_tiles_x()); 60 EXPECT_LT(x, tiling_.num_tiles_x());
60 EXPECT_LT(y, tiling_.num_tiles_y()); 61 EXPECT_LT(y, tiling_.num_tiles_y());
61 62
62 if (HasRecordingAt(x, y)) 63 if (HasRecordingAt(x, y))
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void FakePicturePile::RerecordPile() { 96 void FakePicturePile::RerecordPile() {
96 for (int y = 0; y < num_tiles_y(); ++y) { 97 for (int y = 0; y < num_tiles_y(); ++y) {
97 for (int x = 0; x < num_tiles_x(); ++x) { 98 for (int x = 0; x < num_tiles_x(); ++x) {
98 RemoveRecordingAt(x, y); 99 RemoveRecordingAt(x, y);
99 AddRecordingAt(x, y); 100 AddRecordingAt(x, y);
100 } 101 }
101 } 102 }
102 } 103 }
103 104
104 } // namespace cc 105 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_picture_pile.h ('k') | cc/test/fake_picture_pile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698