Commit 352a8162 authored by Russell Brenner's avatar Russell Brenner
Browse files

Adding skia header changes as needed for webkit MR1 to compile

Change-Id: I7069c3d076a60826f7b6508b0a73b1cd9f8031d9
parent 80a5f14e
......@@ -746,6 +746,11 @@ protected:
// all of the drawBitmap variants call this guy
virtual void commonDrawBitmap(const SkBitmap&, const SkMatrix& m,
const SkPaint& paint);
virtual void commonDrawBitmap(const SkBitmap& b, const SkIRect*,
const SkMatrix& m, const SkPaint& paint)
{
commonDrawBitmap(b, m, paint);
}
private:
class MCRec;
......
......@@ -27,6 +27,36 @@
struct SkIRect {
int32_t fLeft, fTop, fRight, fBottom;
static SkIRect MakeEmpty() {
SkIRect r;
r.setEmpty();
return r;
}
static SkIRect MakeWH(int32_t w, int32_t h) {
SkIRect r;
r.set(0, 0, w, h);
return r;
}
static SkIRect MakeSize(const SkISize& size) {
SkIRect r;
r.set(0, 0, size.width(), size.height());
return r;
}
static SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b) {
SkIRect rect;
rect.set(l, t, r, b);
return rect;
}
static SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h) {
SkIRect r;
r.set(x, y, x + w, y + h);
return r;
}
/** Return true if the rectangle's width or height are <= 0
*/
bool isEmpty() const { return fLeft >= fRight || fTop >= fBottom; }
......@@ -233,6 +263,18 @@ struct SkIRect {
struct SkRect {
SkScalar fLeft, fTop, fRight, fBottom;
static SkRect MakeEmpty() {
SkRect r;
r.setEmpty();
return r;
}
static SkRect MakeWH(SkScalar w, SkScalar h) {
SkRect r;
r.set(0, 0, w, h);
return r;
}
static SkRect MakeSize(const SkSize& size) {
SkRect r;
r.set(0, 0, size.width(), size.height());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment