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

Unified Diff: cc/resources/picture_pile.cc

Issue 73923003: Shared Raster Worker Threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving number of raster thread API to RasterWorkerPool + comments Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: cc/resources/picture_pile.cc
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
old mode 100644
new mode 100755
index 68d75d7aea14e29e21c65a16e6ae7eac90f17b29..f1fb1d1988ee605040480736f5137d338d920ccf
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -9,8 +9,10 @@
#include <vector>
#include "cc/base/region.h"
+#include "cc/base/switches.h"
reveman 2014/01/06 07:13:12 no need to add this include
sohanjg 2014/01/06 09:57:29 Done.
#include "cc/debug/rendering_stats_instrumentation.h"
#include "cc/resources/picture_pile_impl.h"
+#include "cc/resources/raster_worker_pool.h"
#include "cc/resources/tile_priority.h"
namespace {
@@ -231,10 +233,11 @@ bool PicturePile::Update(
}
int recorded_pixel_count =
picture->LayerRect().width() * picture->LayerRect().height();
+ size_t num_raster_threads = RasterWorkerPool::GetNumRasterThreads();
stats_instrumentation->AddRecord(best_duration, recorded_pixel_count);
- if (num_raster_threads_ > 1)
+ if (num_raster_threads > 1)
picture->GatherPixelRefs(tile_grid_info_);
- picture->CloneForDrawing(num_raster_threads_);
+ picture->CloneForDrawing(static_cast<int>(num_raster_threads));
}
for (TilingData::Iterator it(&tiling_, record_rect);

Powered by Google App Engine
This is Rietveld 408576698