~chrisccoulson/oxide/rendering-updates

« back to all changes in this revision

Viewing changes to shared/browser/compositor/oxide_compositor_software_output_device.cc

  • Committer: Chris Coulson
  • Date: 2014-06-19 07:29:50 UTC
  • Revision ID: chris.coulson@canonical.com-20140619072950-y9eebtwr2vli2oj4
Don't DCHECK if a pending frame is returned out of order

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
    }
74
74
  }
75
75
 
76
 
  DCHECK(!previous_damage_rects_.empty() ||
77
 
         previous_frame_.id == 0 ||
78
 
         previous_frame_.id == current_frame_.id);
79
 
 
80
76
  SkRegion outdated_region;
81
 
  for (std::deque<DamageData>::iterator it = previous_damage_rects_.begin();
82
 
       it != previous_damage_rects_.end(); ++it) {
83
 
    outdated_region.op(gfx::RectToSkIRect(it->damage), SkRegion::kUnion_Op);
 
77
 
 
78
  if (previous_damage_rects_.empty() &&
 
79
      previous_frame_.id != 0 &&
 
80
      previous_frame_.id != current_frame_.id) {
 
81
    outdated_region.setRect(
 
82
        gfx::RectToSkIRect(gfx::Rect(viewport_pixel_size_)));
 
83
  } else {
 
84
    for (std::deque<DamageData>::iterator it = previous_damage_rects_.begin();
 
85
         it != previous_damage_rects_.end(); ++it) {
 
86
      outdated_region.op(gfx::RectToSkIRect(it->damage), SkRegion::kUnion_Op);
 
87
    }
84
88
  }
 
89
 
85
90
  outdated_region.op(gfx::RectToSkIRect(damage_rect),
86
91
                     SkRegion::kDifference_Op);
87
92