1 /*
2 * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
33 import com.sun.javafx.iio.ImageLoader;
34 import com.sun.javafx.iio.ImageMetadata;
35 import com.sun.javafx.iio.ImageStorage;
36 import com.sun.javafx.iio.ImageStorageException;
37 import com.sun.javafx.runtime.async.AbstractRemoteResource;
38 import com.sun.javafx.runtime.async.AsyncOperationListener;
39 import com.sun.javafx.tk.PlatformImage;
40 import com.sun.prism.Image;
41 import com.sun.prism.impl.PrismSettings;
42 import java.lang.reflect.UndeclaredThrowableException;
43 import java.security.AccessControlContext;
44 import java.security.AccessController;
45 import java.security.PrivilegedAction;
46 import java.security.PrivilegedActionException;
47 import java.security.PrivilegedExceptionAction;
48 import java.util.concurrent.ExecutorService;
49 import java.util.concurrent.Executors;
50 import java.util.concurrent.ThreadFactory;
51 import java.util.concurrent.ThreadPoolExecutor;
52 import java.util.concurrent.TimeUnit;
53 import sun.util.logging.PlatformLogger;
54
55 class PrismImageLoader2 implements com.sun.javafx.tk.ImageLoader {
56
57 private static PlatformLogger imageioLogger = null;
58
59 private Image[] images;
60 private int[] delayTimes;
61 private int loopCount;
62 private double width;
63 private double height;
64 private float pixelScale;
65 private Exception exception;
66
67 public PrismImageLoader2(String url, double width, double height,
68 boolean preserveRatio, float pixelScale,
69 boolean smooth)
70 {
71 loadAll(url, width, height, preserveRatio, pixelScale, smooth);
72 }
73
|
1 /*
2 * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
33 import com.sun.javafx.iio.ImageLoader;
34 import com.sun.javafx.iio.ImageMetadata;
35 import com.sun.javafx.iio.ImageStorage;
36 import com.sun.javafx.iio.ImageStorageException;
37 import com.sun.javafx.runtime.async.AbstractRemoteResource;
38 import com.sun.javafx.runtime.async.AsyncOperationListener;
39 import com.sun.javafx.tk.PlatformImage;
40 import com.sun.prism.Image;
41 import com.sun.prism.impl.PrismSettings;
42 import java.lang.reflect.UndeclaredThrowableException;
43 import java.security.AccessControlContext;
44 import java.security.AccessController;
45 import java.security.PrivilegedAction;
46 import java.security.PrivilegedActionException;
47 import java.security.PrivilegedExceptionAction;
48 import java.util.concurrent.ExecutorService;
49 import java.util.concurrent.Executors;
50 import java.util.concurrent.ThreadFactory;
51 import java.util.concurrent.ThreadPoolExecutor;
52 import java.util.concurrent.TimeUnit;
53 import com.sun.javafx.logging.PlatformLogger;
54
55 class PrismImageLoader2 implements com.sun.javafx.tk.ImageLoader {
56
57 private static PlatformLogger imageioLogger = null;
58
59 private Image[] images;
60 private int[] delayTimes;
61 private int loopCount;
62 private double width;
63 private double height;
64 private float pixelScale;
65 private Exception exception;
66
67 public PrismImageLoader2(String url, double width, double height,
68 boolean preserveRatio, float pixelScale,
69 boolean smooth)
70 {
71 loadAll(url, width, height, preserveRatio, pixelScale, smooth);
72 }
73
|