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
halo
external_skia
Commits
f490d8c1
Commit
f490d8c1
authored
12 years ago
by
Jean-Baptiste Queru
Committed by
Gerrit Code Review
12 years ago
Browse files
Options
Download
Plain Diff
Merge "Tweaks for forward compatibility"
parents
7cd90d4e
d25650fd
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
55 additions
and
3 deletions
+55
-3
include/core/SkCanvas.h
include/core/SkCanvas.h
+4
-0
include/core/SkDrawFilter.h
include/core/SkDrawFilter.h
+1
-1
include/core/SkMatrix.h
include/core/SkMatrix.h
+1
-0
include/core/SkRegion.h
include/core/SkRegion.h
+1
-0
include/effects/SkPaintFlagsDrawFilter.h
include/effects/SkPaintFlagsDrawFilter.h
+1
-1
src/core/SkMathPriv.h
src/core/SkMathPriv.h
+0
-0
src/core/SkOrderedReadBuffer.h
src/core/SkOrderedReadBuffer.h
+20
-0
src/core/SkOrderedWriteBuffer.h
src/core/SkOrderedWriteBuffer.h
+25
-0
src/effects/SkPaintFlagsDrawFilter.cpp
src/effects/SkPaintFlagsDrawFilter.cpp
+2
-1
No files found.
include/core/SkCanvas.h
View file @
f490d8c1
...
...
@@ -405,6 +405,7 @@ public:
intersect with the canvas' clip
*/
bool
quickReject
(
const
SkRect
&
rect
,
EdgeType
et
)
const
;
bool
quickReject
(
const
SkRect
&
rect
)
const
{
return
false
;
}
/** Return true if the specified path, after being transformed by the
current matrix, would lie completely outside of the current clip. Call
...
...
@@ -418,6 +419,7 @@ public:
intersect with the canvas' clip
*/
bool
quickReject
(
const
SkPath
&
path
,
EdgeType
et
)
const
;
bool
quickReject
(
const
SkPath
&
path
)
const
{
return
false
;
}
/** Return true if the horizontal band specified by top and bottom is
completely clipped out. This is a conservative calculation, meaning
...
...
@@ -646,6 +648,8 @@ public:
virtual
void
drawBitmap
(
const
SkBitmap
&
bitmap
,
SkScalar
left
,
SkScalar
top
,
const
SkPaint
*
paint
=
NULL
);
virtual
void
drawBitmapRectToRect
(
const
SkBitmap
&
,
const
SkRect
*
,
const
SkRect
&
,
const
SkPaint
*
)
{}
/** Draw the specified bitmap, with the specified matrix applied (before the
canvas' matrix is applied).
@param bitmap The bitmap to be drawn
...
...
This diff is collapsed.
Click to expand it.
include/core/SkDrawFilter.h
View file @
f490d8c1
...
...
@@ -37,7 +37,7 @@ public:
* Called with the paint that will be used to draw the specified type.
* The implementation may modify the paint as they wish.
*/
virtual
void
filter
(
SkPaint
*
,
Type
)
=
0
;
virtual
bool
filter
(
SkPaint
*
,
Type
)
=
0
;
};
#endif
This diff is collapsed.
Click to expand it.
include/core/SkMatrix.h
View file @
f490d8c1
...
...
@@ -504,6 +504,7 @@ public:
};
// return the number of bytes written, whether or not buffer is null
uint32_t
flatten
(
void
*
buffer
)
const
;
uint32_t
writeToMemory
(
void
*
)
const
{
return
0
;
}
// return the number of bytes read
uint32_t
unflatten
(
const
void
*
buffer
);
...
...
This diff is collapsed.
Click to expand it.
include/core/SkRegion.h
View file @
f490d8c1
...
...
@@ -352,6 +352,7 @@ public:
* If buffer is NULL, it still returns the number of bytes.
*/
uint32_t
flatten
(
void
*
buffer
)
const
;
uint32_t
writeToMemory
(
void
*
buffer
)
const
{
return
0
;
}
/**
* Initialized the region from the buffer, returning the number
...
...
This diff is collapsed.
Click to expand it.
include/effects/SkPaintFlagsDrawFilter.h
View file @
f490d8c1
...
...
@@ -17,7 +17,7 @@ public:
SkPaintFlagsDrawFilter
(
uint32_t
clearFlags
,
uint32_t
setFlags
);
// overrides
virtual
void
filter
(
SkPaint
*
,
Type
);
virtual
bool
filter
(
SkPaint
*
,
Type
);
private:
uint32_t
fPrevFlags
;
// local cache for filter/restore
...
...
This diff is collapsed.
Click to expand it.
src/core/SkMathPriv.h
0 → 100644
View file @
f490d8c1
This diff is collapsed.
Click to expand it.
src/core/SkOrderedReadBuffer.h
0 → 100644
View file @
f490d8c1
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkOrderedReadBuffer_DEFINED
#define SkOrderedReadBuffer_DEFINED
class
SkFlattenableReadBuffer
{
public:
};
class
SkOrderedReadBuffer
:
public
SkFlattenableReadBuffer
{
public:
SkOrderedReadBuffer
(
const
void
*
,
size_t
)
{}
};
#endif // SkOrderedReadBuffer_DEFINED
This diff is collapsed.
Click to expand it.
src/core/SkOrderedWriteBuffer.h
0 → 100644
View file @
f490d8c1
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkOrderedWriteBuffer_DEFINED
#define SkOrderedWriteBuffer_DEFINED
class
SkFlattenableWriteBuffer
{
public:
enum
{
kCrossProcess_Flag
};
};
class
SkOrderedWriteBuffer
:
public
SkFlattenableWriteBuffer
{
public:
SkOrderedWriteBuffer
(
size_t
)
{}
virtual
~
SkOrderedWriteBuffer
()
{}
uint32_t
size
()
{
return
0
;
}
virtual
bool
writeToStream
(
void
*
)
{
return
false
;
}
void
setFlags
(
uint32_t
)
{}
};
#endif // SkOrderedWriteBuffer_DEFINED
This diff is collapsed.
Click to expand it.
src/effects/SkPaintFlagsDrawFilter.cpp
View file @
f490d8c1
...
...
@@ -16,7 +16,8 @@ SkPaintFlagsDrawFilter::SkPaintFlagsDrawFilter(uint32_t clearFlags,
fSetFlags
=
SkToU16
(
setFlags
&
SkPaint
::
kAllFlags
);
}
void
SkPaintFlagsDrawFilter
::
filter
(
SkPaint
*
paint
,
Type
)
{
bool
SkPaintFlagsDrawFilter
::
filter
(
SkPaint
*
paint
,
Type
)
{
paint
->
setFlags
((
paint
->
getFlags
()
&
~
fClearFlags
)
|
fSetFlags
);
return
false
;
}
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