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

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

Issue 1837263005: cc: Rename DisplayListRasterSource to just RasterSource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 #include "cc/tiles/tile.h" 10 #include "cc/tiles/tile.h"
11 #include "cc/trees/layer_tree_impl.h" 11 #include "cc/trees/layer_tree_impl.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 FakePictureLayerImpl::FakePictureLayerImpl( 15 FakePictureLayerImpl::FakePictureLayerImpl(
16 LayerTreeImpl* tree_impl, 16 LayerTreeImpl* tree_impl,
17 int id, 17 int id,
18 scoped_refptr<DisplayListRasterSource> raster_source, 18 scoped_refptr<RasterSource> raster_source,
19 bool is_mask) 19 bool is_mask)
20 : PictureLayerImpl(tree_impl, id, is_mask), 20 : PictureLayerImpl(tree_impl, id, is_mask),
21 append_quads_count_(0), 21 append_quads_count_(0),
22 did_become_active_call_count_(0), 22 did_become_active_call_count_(0),
23 has_valid_tile_priorities_(false), 23 has_valid_tile_priorities_(false),
24 use_set_valid_tile_priorities_flag_(false), 24 use_set_valid_tile_priorities_flag_(false),
25 release_resources_count_(0) { 25 release_resources_count_(0) {
26 SetBounds(raster_source->GetSize()); 26 SetBounds(raster_source->GetSize());
27 SetRasterSourceOnPending(raster_source, Region()); 27 SetRasterSourceOnPending(raster_source, Region());
28 } 28 }
29 29
30 FakePictureLayerImpl::FakePictureLayerImpl( 30 FakePictureLayerImpl::FakePictureLayerImpl(
31 LayerTreeImpl* tree_impl, 31 LayerTreeImpl* tree_impl,
32 int id, 32 int id,
33 scoped_refptr<DisplayListRasterSource> raster_source, 33 scoped_refptr<RasterSource> raster_source,
34 bool is_mask, 34 bool is_mask,
35 const gfx::Size& layer_bounds) 35 const gfx::Size& layer_bounds)
36 : PictureLayerImpl(tree_impl, id, is_mask), 36 : PictureLayerImpl(tree_impl, id, is_mask),
37 append_quads_count_(0), 37 append_quads_count_(0),
38 did_become_active_call_count_(0), 38 did_become_active_call_count_(0),
39 has_valid_tile_priorities_(false), 39 has_valid_tile_priorities_(false),
40 use_set_valid_tile_priorities_flag_(false), 40 use_set_valid_tile_priorities_flag_(false),
41 release_resources_count_(0) { 41 release_resources_count_(0) {
42 SetBounds(layer_bounds); 42 SetBounds(layer_bounds);
43 SetRasterSourceOnPending(raster_source, Region()); 43 SetRasterSourceOnPending(raster_source, Region());
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if (tiling->resolution() == LOW_RESOLUTION) { 101 if (tiling->resolution() == LOW_RESOLUTION) {
102 // There should be only one low res tiling. 102 // There should be only one low res tiling.
103 CHECK(!result); 103 CHECK(!result);
104 result = tiling; 104 result = tiling;
105 } 105 }
106 } 106 }
107 return result; 107 return result;
108 } 108 }
109 109
110 void FakePictureLayerImpl::SetRasterSourceOnPending( 110 void FakePictureLayerImpl::SetRasterSourceOnPending(
111 scoped_refptr<DisplayListRasterSource> raster_source, 111 scoped_refptr<RasterSource> raster_source,
112 const Region& invalidation) { 112 const Region& invalidation) {
113 DCHECK(layer_tree_impl()->IsPendingTree()); 113 DCHECK(layer_tree_impl()->IsPendingTree());
114 Region invalidation_temp = invalidation; 114 Region invalidation_temp = invalidation;
115 const PictureLayerTilingSet* pending_set = nullptr; 115 const PictureLayerTilingSet* pending_set = nullptr;
116 set_gpu_raster_max_texture_size(layer_tree_impl()->device_viewport_size()); 116 set_gpu_raster_max_texture_size(layer_tree_impl()->device_viewport_size());
117 UpdateRasterSource(raster_source, &invalidation_temp, pending_set); 117 UpdateRasterSource(raster_source, &invalidation_temp, pending_set);
118 } 118 }
119 119
120 void FakePictureLayerImpl::SetIsDrawnRenderSurfaceLayerListMember(bool is) { 120 void FakePictureLayerImpl::SetIsDrawnRenderSurfaceLayerListMember(bool is) {
121 draw_properties().last_drawn_render_surface_layer_list_id = 121 draw_properties().last_drawn_render_surface_layer_list_id =
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 return CountTilesRequired(&PictureLayerTiling::IsTileRequiredForDraw); 219 return CountTilesRequired(&PictureLayerTiling::IsTileRequiredForDraw);
220 } 220 }
221 221
222 void FakePictureLayerImpl::ReleaseResources() { 222 void FakePictureLayerImpl::ReleaseResources() {
223 PictureLayerImpl::ReleaseResources(); 223 PictureLayerImpl::ReleaseResources();
224 ++release_resources_count_; 224 ++release_resources_count_;
225 } 225 }
226 226
227 } // namespace cc 227 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_impl.h ('k') | cc/test/fake_picture_layer_tiling_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698