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

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 2578193003: cc: Add more PictureLayerImpl tracing information. (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 state->BeginDictionary(); 1318 state->BeginDictionary();
1319 1319
1320 MathUtil::AddToTracedValue("geometry_rect", iter.geometry_rect(), state); 1320 MathUtil::AddToTracedValue("geometry_rect", iter.geometry_rect(), state);
1321 1321
1322 if (*iter) 1322 if (*iter)
1323 TracedValue::SetIDRef(*iter, state, "tile"); 1323 TracedValue::SetIDRef(*iter, state, "tile");
1324 1324
1325 state->EndDictionary(); 1325 state->EndDictionary();
1326 } 1326 }
1327 state->EndArray(); 1327 state->EndArray();
1328
1329 state->BeginDictionary("can_have_tilings_state");
1330 state->SetBoolean("can_have_tilings", CanHaveTilings());
1331 state->SetBoolean("raster_source_solid_color",
1332 raster_source_->IsSolidColor());
1333 state->SetBoolean("draws_content", DrawsContent());
1334 state->SetBoolean("raster_source_has_recordings",
1335 raster_source_->HasRecordings());
1336 state->SetDouble("max_contents_scale", MaximumTilingContentsScale());
1337 state->SetDouble("min_contents_scale", MinimumContentsScale());
1338 state->EndDictionary();
1339
1340 state->BeginDictionary("raster_scales");
1341 state->SetDouble("page_scale", raster_page_scale_);
1342 state->SetDouble("device_scale", raster_device_scale_);
1343 state->SetDouble("source_scale", raster_source_scale_);
1344 state->SetDouble("contents_scale", raster_contents_scale_);
1345 state->SetDouble("low_res_contents_scale", low_res_raster_contents_scale_);
1346 state->EndDictionary();
1347
1348 state->BeginDictionary("ideal_scales");
1349 state->SetDouble("page_scale", ideal_page_scale_);
1350 state->SetDouble("device_scale", ideal_device_scale_);
1351 state->SetDouble("source_scale", ideal_source_scale_);
1352 state->SetDouble("contents_scale", ideal_contents_scale_);
1353 state->EndDictionary();
1328 } 1354 }
1329 1355
1330 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { 1356 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const {
1331 return tilings_->GPUMemoryUsageInBytes(); 1357 return tilings_->GPUMemoryUsageInBytes();
1332 } 1358 }
1333 1359
1334 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 1360 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
1335 benchmark->RunOnLayer(this); 1361 benchmark->RunOnLayer(this);
1336 } 1362 }
1337 1363
1338 WhichTree PictureLayerImpl::GetTree() const { 1364 WhichTree PictureLayerImpl::GetTree() const {
1339 return layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; 1365 return layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
1340 } 1366 }
1341 1367
1342 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1368 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1343 return !layer_tree_impl()->IsRecycleTree(); 1369 return !layer_tree_impl()->IsRecycleTree();
1344 } 1370 }
1345 1371
1346 bool PictureLayerImpl::HasValidTilePriorities() const { 1372 bool PictureLayerImpl::HasValidTilePriorities() const {
1347 return IsOnActiveOrPendingTree() && 1373 return IsOnActiveOrPendingTree() &&
1348 is_drawn_render_surface_layer_list_member(); 1374 is_drawn_render_surface_layer_list_member();
1349 } 1375 }
1350 1376
1351 } // namespace cc 1377 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698