Compile fix, additional sync changes
This commit is contained in:
@@ -1829,7 +1829,7 @@ class Image {
|
||||
private function get_src ():Dynamic {
|
||||
|
||||
#if (js && html5)
|
||||
if (buffer.__srcCanvas == null && (buffer.data != null || image.type == DATA)) {
|
||||
if (buffer.__srcCanvas == null && (buffer.data != null || type == DATA)) {
|
||||
|
||||
ImageCanvasUtil.convertToCanvas (this);
|
||||
|
||||
|
||||
@@ -138,8 +138,7 @@ class JPEG {
|
||||
|
||||
#elseif js
|
||||
|
||||
image.type = CANVAS;
|
||||
ImageCanvasUtil.sync (image, false);
|
||||
ImageCanvasUtil.convertToCanvas (image, false);
|
||||
|
||||
if (image.buffer.__srcCanvas != null) {
|
||||
|
||||
|
||||
@@ -149,8 +149,7 @@ class PNG {
|
||||
|
||||
#elseif js
|
||||
|
||||
image.type = CANVAS;
|
||||
ImageCanvasUtil.sync (image, false);
|
||||
ImageCanvasUtil.convertToCanvas (image, false);
|
||||
|
||||
if (image.buffer.__srcCanvas != null) {
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ class ImageCanvasUtil {
|
||||
|
||||
public static function convertToCanvas (image:Image, clear:Bool = false):Void {
|
||||
|
||||
#if (js && html5)
|
||||
var buffer = image.buffer;
|
||||
|
||||
#if (js && html5)
|
||||
if (buffer.__srcImage != null) {
|
||||
|
||||
if (buffer.__srcCanvas == null) {
|
||||
@@ -429,11 +429,11 @@ class ImageCanvasUtil {
|
||||
if (image == null) return;
|
||||
|
||||
#if (js && html5)
|
||||
if (image.type == CANVAS) {
|
||||
if (image.type == CANVAS && (image.buffer.__srcCanvas != null || image.buffer.data != null)) {
|
||||
|
||||
convertToCanvas (image, clear);
|
||||
|
||||
} else {
|
||||
} else if (image.type == DATA) {
|
||||
|
||||
convertToData (image, clear);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user