projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git]
/
src
/
third_party
/
skia
/
src
/
image
/
SkSurface.cpp
diff --git
a/src/third_party/skia/src/image/SkSurface.cpp
b/src/third_party/skia/src/image/SkSurface.cpp
index
ecb8042
..
edc6ef5
100644
(file)
--- a/
src/third_party/skia/src/image/SkSurface.cpp
+++ b/
src/third_party/skia/src/image/SkSurface.cpp
@@
-43,11
+43,7
@@
void SkSurface_Base::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y,
void SkSurface_Base::aboutToDraw(ContentChangeMode mode) {
this->dirtyGenerationID();
void SkSurface_Base::aboutToDraw(ContentChangeMode mode) {
this->dirtyGenerationID();
- if (NULL != fCachedCanvas) {
- SkASSERT(fCachedCanvas->getSurfaceBase() == this || \
- NULL == fCachedCanvas->getSurfaceBase());
- fCachedCanvas->setSurfaceBase(NULL);
- }
+ SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this);
if (NULL != fCachedImage) {
// the surface may need to fork its backend, if its sharing it with
if (NULL != fCachedImage) {
// the surface may need to fork its backend, if its sharing it with
@@
-61,12
+57,13
@@
void SkSurface_Base::aboutToDraw(ContentChangeMode mode) {
// that the next request will get our new contents.
fCachedImage->unref();
fCachedImage = NULL;
// that the next request will get our new contents.
fCachedImage->unref();
fCachedImage = NULL;
+ } else if (kDiscard_ContentChangeMode == mode) {
+ this->onDiscard();
}
}
uint32_t SkSurface_Base::newGenerationID() {
}
}
uint32_t SkSurface_Base::newGenerationID() {
- this->installIntoCanvasForDirtyNotification();
-
+ SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this);
static int32_t gID;
return sk_atomic_inc(&gID) + 1;
}
static int32_t gID;
return sk_atomic_inc(&gID) + 1;
}