Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
scorpio
external_skia
Commits
352a8162
Commit
352a8162
authored
14 years ago
by
Russell Brenner
Browse files
Options
Download
Email Patches
Plain Diff
Adding skia header changes as needed for webkit MR1 to compile
Change-Id: I7069c3d076a60826f7b6508b0a73b1cd9f8031d9
parent
80a5f14e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
include/core/SkCanvas.h
include/core/SkCanvas.h
+5
-0
include/core/SkRect.h
include/core/SkRect.h
+42
-0
No files found.
include/core/SkCanvas.h
View file @
352a8162
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
include/core/SkRect.h
View file @
352a8162
...
...
@@ -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
());
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment