Compile fix, additional sync changes

This commit is contained in:
Joshua Granick
2018-06-07 05:17:17 -07:00
parent 76854e801a
commit f01e980114
4 changed files with 6 additions and 8 deletions

View File

@@ -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);

View File

@@ -138,8 +138,7 @@ class JPEG {
#elseif js
image.type = CANVAS;
ImageCanvasUtil.sync (image, false);
ImageCanvasUtil.convertToCanvas (image, false);
if (image.buffer.__srcCanvas != null) {

View File

@@ -149,8 +149,7 @@ class PNG {
#elseif js
image.type = CANVAS;
ImageCanvasUtil.sync (image, false);
ImageCanvasUtil.convertToCanvas (image, false);
if (image.buffer.__srcCanvas != null) {

View File

@@ -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);