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

Unified Diff: cc/picture_layer_impl.cc

Issue 12316084: cc: Consolidate the analysis_canvas operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tomhudson's review Created 7 years, 10 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/picture_layer_impl.cc
diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc
index f0ce9ad08e8a14dbab093b68dad4f40b06c86af2..17c7be6bc679c918259bd0cbd22a033ccda8d93f 100644
--- a/cc/picture_layer_impl.cc
+++ b/cc/picture_layer_impl.cc
@@ -115,8 +115,11 @@ void PictureLayerImpl::appendQuads(QuadSink& quadSink,
++iter) {
SkColor color;
float width;
- if (*iter && iter->GetResourceId()) {
- if (iter->priority(ACTIVE_TREE).resolution == HIGH_RESOLUTION) {
+ if (*iter && iter->is_ready_to_draw()) {
+ if (iter->is_solid_color() || iter->is_transparent()) {
+ color = DebugColors::SolidColorTileBorderColor();
+ width = DebugColors::SolidColorTileBorderWidth(layerTreeImpl());
+ } else if (iter->priority(ACTIVE_TREE).resolution == HIGH_RESOLUTION) {
color = DebugColors::HighResTileBorderColor();
width = DebugColors::HighResTileBorderWidth(layerTreeImpl());
} else if (iter->priority(ACTIVE_TREE).resolution == LOW_RESOLUTION) {
@@ -159,6 +162,20 @@ void PictureLayerImpl::appendQuads(QuadSink& quadSink,
gfx::Rect geometry_rect = iter.geometry_rect();
+ if (*iter && iter->is_solid_color()) {
reveman 2013/02/28 18:54:55 I think it might be cleaner to move all this into
+ scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create();
+ quad->SetNew(sharedQuadState,
+ geometry_rect,
+ iter->get_solid_color());
+
+ quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData);
+
+ if (!seen_tilings.size() || seen_tilings.back() != iter.CurrentTiling())
+ seen_tilings.push_back(iter.CurrentTiling());
+ continue;
+ } else if (*iter && iter->is_transparent()) {
reveman 2013/02/28 18:54:55 is the "else if" needed? I think it'd be cleaner w
+ continue;
+ }
if (!resource) {
if (drawCheckerboardForMissingTiles()) {
// TODO(enne): Figure out how to show debug "invalidated checker" color
@@ -522,7 +539,7 @@ bool PictureLayerImpl::areVisibleResourcesReady() const {
iter;
++iter) {
// A null tile (i.e. no recording) is considered "ready".
- if (!*iter || iter->GetResourceId())
+ if (!*iter || iter->is_ready_to_draw())
missing_region.Subtract(iter.geometry_rect());
}
}
« no previous file with comments | « cc/picture.cc ('k') | cc/picture_layer_tiling_set.cc » ('j') | cc/picture_pile_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698