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

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

Issue 793693003: Tile Compression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/surfaces/surface_aggregator_unittest.cc ('k') | cc/test/fake_picture_layer_tiling_client.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/fake_picture_layer_impl.h" 5 #include "cc/test/fake_picture_layer_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "cc/resources/tile.h" 8 #include "cc/resources/tile.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 return result; 99 return result;
100 } 100 }
101 101
102 void FakePictureLayerImpl::SetRasterSource( 102 void FakePictureLayerImpl::SetRasterSource(
103 scoped_refptr<RasterSource> raster_source) { 103 scoped_refptr<RasterSource> raster_source) {
104 raster_source_.swap(raster_source); 104 raster_source_.swap(raster_source);
105 if (tilings()) { 105 if (tilings()) {
106 for (size_t i = 0; i < num_tilings(); ++i) { 106 for (size_t i = 0; i < num_tilings(); ++i) {
107 tilings()->tiling_at(i)->UpdateTilesToCurrentRasterSource( 107 tilings()->tiling_at(i)->UpdateTilesToCurrentRasterSource(
108 raster_source_.get(), Region(), raster_source_->GetSize()); 108 raster_source_.get(), Region(), raster_source_->GetSize(),
109 base::TimeTicks());
109 } 110 }
110 } 111 }
111 } 112 }
112 113
113 void FakePictureLayerImpl::SetAllTilesVisible() { 114 void FakePictureLayerImpl::SetAllTilesVisible() {
114 WhichTree tree = 115 WhichTree tree =
115 layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; 116 layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
116 117
117 for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings(); 118 for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings();
118 ++tiling_idx) { 119 ++tiling_idx) {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 return CountTilesRequired( 252 return CountTilesRequired(
252 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); 253 &PictureLayerTiling::IsTileRequiredForDrawIfVisible);
253 } 254 }
254 255
255 void FakePictureLayerImpl::ReleaseResources() { 256 void FakePictureLayerImpl::ReleaseResources() {
256 PictureLayerImpl::ReleaseResources(); 257 PictureLayerImpl::ReleaseResources();
257 ++release_resources_count_; 258 ++release_resources_count_;
258 } 259 }
259 260
260 } // namespace cc 261 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/test/fake_picture_layer_tiling_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698