Bug 1117026 - Cherry-pick commit a10742c of upstream skia code; r=upstream

This commit is contained in:
Ehsan Akhgari 2015-01-02 00:10:19 -05:00
Родитель b71f548568
Коммит defb49db61
8 изменённых файлов: 7 добавлений и 12 удалений

Просмотреть файл

@ -277,7 +277,6 @@ struct SK_API SkIRect {
rectangle. If either rectangle is empty, do nothing and return false.
*/
bool intersect(const SkIRect& a, const SkIRect& b) {
SkASSERT(&a && &b);
if (!a.isEmpty() && !b.isEmpty() &&
a.fLeft < b.fRight && b.fLeft < a.fRight &&
@ -298,7 +297,6 @@ struct SK_API SkIRect {
we assert that both rectangles are non-empty.
*/
bool intersectNoEmptyCheck(const SkIRect& a, const SkIRect& b) {
SkASSERT(&a && &b);
SkASSERT(!a.isEmpty() && !b.isEmpty());
if (a.fLeft < b.fRight && b.fLeft < a.fRight &&

Просмотреть файл

@ -129,7 +129,7 @@ public:
*/
int appendAction(const char label[], SkEventSinkID target);
int appendList(const char label[], const char slotName[],
SkEventSinkID target, int defaultIndex, const char[] ...);
SkEventSinkID target, int defaultIndex, const char* ...);
int appendSlider(const char label[], const char slotName[],
SkEventSinkID target, SkScalar min, SkScalar max,
SkScalar defaultValue);

Просмотреть файл

@ -1067,7 +1067,7 @@ void SkMatrix::mapVectors(SkPoint dst[], const SkPoint src[], int count) const {
}
bool SkMatrix::mapRect(SkRect* dst, const SkRect& src) const {
SkASSERT(dst && &src);
SkASSERT(dst);
if (this->rectStaysRect()) {
this->mapPoints((SkPoint*)dst, (const SkPoint*)&src, 2);

Просмотреть файл

@ -114,12 +114,10 @@ bool SkRect::intersect(SkScalar left, SkScalar top, SkScalar right,
}
bool SkRect::intersect(const SkRect& r) {
SkASSERT(&r);
return this->intersect(r.fLeft, r.fTop, r.fRight, r.fBottom);
}
bool SkRect::intersect2(const SkRect& r) {
SkASSERT(&r);
SkScalar L = SkMaxScalar(fLeft, r.fLeft);
SkScalar R = SkMinScalar(fRight, r.fRight);
if (L >= R) {
@ -135,7 +133,6 @@ bool SkRect::intersect2(const SkRect& r) {
}
bool SkRect::intersect(const SkRect& a, const SkRect& b) {
SkASSERT(&a && &b);
if (!a.isEmpty() && !b.isEmpty() &&
a.fLeft < b.fRight && b.fLeft < a.fRight &&

Просмотреть файл

@ -432,7 +432,7 @@ static SkEdge* sort_edges(SkEdge* list[], int count, SkEdge** last) {
void sk_fill_path(const SkPath& path, const SkIRect* clipRect, SkBlitter* blitter,
int start_y, int stop_y, int shiftEdgesUp,
const SkRegion& clipRgn) {
SkASSERT(&path && blitter);
SkASSERT(blitter);
SkEdgeBuilder builder;

Просмотреть файл

@ -1337,7 +1337,7 @@ void SkScalerContext_FreeType::generatePath(const SkGlyph& glyph,
SkPath* path) {
SkAutoMutexAcquire ac(gFTMutex);
SkASSERT(&glyph && path);
SkASSERT(path);
if (this->setupSize()) {
path->reset();

Просмотреть файл

@ -167,7 +167,7 @@ void SkTextBox::setSpacing(SkScalar mul, SkScalar add)
void SkTextBox::draw(SkCanvas* canvas, const char text[], size_t len, const SkPaint& paint)
{
SkASSERT(canvas && &paint && (text || len == 0));
SkASSERT(canvas && (text || len == 0));
SkScalar marginWidth = fBox.width();

Просмотреть файл

@ -17,7 +17,7 @@ void SkView::Artist::draw(SkView* view, SkCanvas* canvas)
void SkView::Artist::inflate(const SkDOM& dom, const SkDOM::Node* node)
{
SkASSERT(&dom && node);
SkASSERT(node);
this->onInflate(dom, node);
}
@ -63,7 +63,7 @@ void SkView::Layout::layoutChildren(SkView* parent)
void SkView::Layout::inflate(const SkDOM& dom, const SkDOM::Node* node)
{
SkASSERT(&dom && node);
SkASSERT(node);
this->onInflate(dom, node);
}