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

Unified Diff: cc/tile_manager.cc

Issue 11434033: Track the cost of impl-side painting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« cc/tile_manager.h ('K') | « cc/tile_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_manager.cc
===================================================================
--- cc/tile_manager.cc (revision 170195)
+++ cc/tile_manager.cc (working copy)
@@ -10,6 +10,7 @@
#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "cc/rendering_stats.h"
#include "cc/resource_pool.h"
#include "cc/tile.h"
#include "third_party/skia/include/core/SkDevice.h"
@@ -62,7 +63,8 @@
manage_tiles_pending_(false),
pending_raster_tasks_(0),
worker_pool_(new base::SequencedWorkerPool(kMaxRasterThreads,
- kRasterThreadNamePrefix)) {
+ kRasterThreadNamePrefix)),
+ rasterize_time_in_seconds_(0) {
}
TileManager::~TileManager() {
@@ -215,6 +217,12 @@
DispatchMoreRasterTasks();
}
+void TileManager::renderingStats(RenderingStats* stats) {
+ stats->totalRasterizeTimeInSeconds += rasterize_time_in_seconds_;
+ rasterize_time_in_seconds_ = 0;
nduca 2012/11/29 18:16:30 we also need number of pixels rasterized
Tom Hudson 2012/11/29 20:30:31 Done.
+}
+
+
void TileManager::AssignGpuMemoryToTiles() {
TRACE_EVENT0("cc", "TileManager::AssignGpuMemoryToTiles");
// Some memory cannot be released. Figure out which.
@@ -322,6 +330,8 @@
TRACE_EVENT0("cc", "TileManager::OnRasterTaskCompleted");
--pending_raster_tasks_;
+ rasterize_time_in_seconds_ += cloned_picture_pile->rasterizeTime();
+
// Release raster resources.
resource_pool_->resource_provider()->unmapPixelBuffer(resource_id);
« cc/tile_manager.h ('K') | « cc/tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698