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

Unified Diff: cc/resources/picture_pile.cc

Issue 222903005: cc: Let skia veto gpu rasterization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/picture_pile.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile.cc
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index 0e2e36310206d2eff158afd53993407dbe3ca342..8a15ea604e71558441fab48c7194740003c61c7a 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -141,8 +141,7 @@ float ClusterTiles(const std::vector<gfx::Rect>& invalid_tiles,
namespace cc {
-PicturePile::PicturePile() {
-}
+PicturePile::PicturePile() : is_suitable_for_gpu_rasterization_(true) {}
PicturePile::~PicturePile() {
}
@@ -245,6 +244,14 @@ bool PicturePile::Update(ContentLayerClient* painter,
gather_pixel_refs,
num_raster_threads,
Picture::RECORD_NORMALLY);
+ // Note the '&&' with previous is-suitable state.
+ // This means that once a picture-pile becomes unsuitable for gpu
+ // rasterization due to some content, it will continue to be unsuitable
+ // even if that content is replaced by gpu-friendly content.
+ // This is an optimization to avoid iterating though all pictures in
+ // the pile after each invalidation.
+ is_suitable_for_gpu_rasterization_ &=
alokp 2014/04/09 18:28:27 enne@: I need to move this flag to the impl thread
enne (OOO) 2014/04/09 18:32:53 PicturePileImpls are never updated, only overwritt
+ picture->IsSuitableForGpuRasterization();
base::TimeDelta duration =
stats_instrumentation->EndRecording(start_time);
best_duration = std::min(duration, best_duration);
« no previous file with comments | « cc/resources/picture_pile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698