rect->fBottom = rect->fTop + size.height();
}
-bool LayerAndroid::boundsIsUnique(SkTDArray<SkRect>* region,
- const SkRect& local) const
+static bool boundsIsUnique(const SkTDArray<SkRect>& region,
+ const SkRect& local)
{
- for (int i = 0; i < region->count(); i++) {
- if ((*region)[i].contains(local))
+ for (int i = 0; i < region.count(); i++) {
+ if (region[i].contains(local))
return false;
}
return true;
localBounds.intersect(local);
if (localBounds.isEmpty())
return;
- if (m_recordingPicture && boundsIsUnique(region, localBounds))
+ if (m_recordingPicture && boundsIsUnique(*region, localBounds))
*region->append() = localBounds;
for (int i = 0; i < countChildren(); i++)
getChild(i)->clipInner(region, m_haveClip ? localBounds : local);
*/
void updatePositions(const SkRect& viewPort);
- void bounds(SkRect* ) const;
void clipArea(SkTDArray<SkRect>* region) const;
const LayerAndroid* find(int x, int y) const;
const LayerAndroid* findById(int uniqueID) const;
virtual void onDraw(SkCanvas*, SkScalar opacity);
private:
+ void bounds(SkRect* ) const;
bool prepareContext(bool force = false);
- bool boundsIsUnique(SkTDArray<SkRect>* region, const SkRect& local) const;
void clipInner(SkTDArray<SkRect>* region, const SkRect& local) const;
bool m_isRootLayer;