< prev index next >

modules/javafx.graphics/src/main/java/com/sun/prism/sw/SWTexture.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -44,10 +44,11 @@
     boolean allocated = false;
     int physicalWidth, physicalHeight, contentWidth, contentHeight;
     private SWResourceFactory factory;
     private int lastImageSerial;
     private final WrapMode wrapMode;
+    private boolean linearFiltering = true;
 
     SWTexture(SWResourceFactory factory, WrapMode wrapMode, int w, int h) {
         this.factory = factory;
         this.wrapMode = wrapMode;
         physicalWidth = w;

@@ -64,10 +65,11 @@
         this.contentWidth = sharedTex.contentWidth;
         this.contentHeight = sharedTex.contentHeight;
         this.factory = sharedTex.factory;
         // REMIND: Use indirection to share the serial number?
         this.lastImageSerial = sharedTex.lastImageSerial;
+        this.linearFiltering = sharedTex.linearFiltering;
         this.wrapMode = altMode;
         lock();
     }
 
     SWResourceFactory getResourceFactory() {

@@ -250,15 +252,17 @@
         return this.createSharedLockedTexture(altMode);
     }
 
     @Override
     public boolean getLinearFiltering() {
-        return false;
+        return linearFiltering;
     }
 
     @Override
-    public void setLinearFiltering(boolean linear) { }
+    public void setLinearFiltering(boolean linear) {
+        linearFiltering = linear;
+    }
 
     void allocate() {
         if (allocated) {
             return;
         }
< prev index next >