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

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

Issue 926023003: cc: Fix bug in generating picture layer pairs from 2 lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layerlistbug: . 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_layer_impl.h ('k') | cc/trees/layer_tree_host_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 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 void FakePictureLayerImpl::SetRasterSourceOnPending( 131 void FakePictureLayerImpl::SetRasterSourceOnPending(
132 scoped_refptr<RasterSource> raster_source, 132 scoped_refptr<RasterSource> raster_source,
133 const Region& invalidation) { 133 const Region& invalidation) {
134 DCHECK(layer_tree_impl()->IsPendingTree()); 134 DCHECK(layer_tree_impl()->IsPendingTree());
135 Region invalidation_temp = invalidation; 135 Region invalidation_temp = invalidation;
136 const PictureLayerTilingSet* pending_set = nullptr; 136 const PictureLayerTilingSet* pending_set = nullptr;
137 UpdateRasterSource(raster_source, &invalidation_temp, pending_set); 137 UpdateRasterSource(raster_source, &invalidation_temp, pending_set);
138 } 138 }
139 139
140 void FakePictureLayerImpl::SetIsDrawnRenderSurfaceLayerListMember(bool is) {
141 draw_properties().last_drawn_render_surface_layer_list_id =
142 is ? layer_tree_impl()->current_render_surface_list_id()
143 : layer_tree_impl()->current_render_surface_list_id() - 1;
144 }
145
140 void FakePictureLayerImpl::CreateAllTiles() { 146 void FakePictureLayerImpl::CreateAllTiles() {
141 for (size_t i = 0; i < num_tilings(); ++i) 147 for (size_t i = 0; i < num_tilings(); ++i)
142 tilings_->tiling_at(i)->CreateAllTilesForTesting(); 148 tilings_->tiling_at(i)->CreateAllTilesForTesting();
143 } 149 }
144 150
145 void FakePictureLayerImpl::SetAllTilesVisible() { 151 void FakePictureLayerImpl::SetAllTilesVisible() {
146 WhichTree tree = 152 WhichTree tree =
147 layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; 153 layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
148 154
149 for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings(); 155 for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 return CountTilesRequired( 272 return CountTilesRequired(
267 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); 273 &PictureLayerTiling::IsTileRequiredForDrawIfVisible);
268 } 274 }
269 275
270 void FakePictureLayerImpl::ReleaseResources() { 276 void FakePictureLayerImpl::ReleaseResources() {
271 PictureLayerImpl::ReleaseResources(); 277 PictureLayerImpl::ReleaseResources();
272 ++release_resources_count_; 278 ++release_resources_count_;
273 } 279 }
274 280
275 } // namespace cc 281 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_impl.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698