The actual problem here was that the scalinestride gets modified when setDataSamples is called. But scanlinestride is a field of this class that gets used in other methods too. So it happend to me that I did set data elements for the whole model (therfore it was optimized and touched the showen code) and later I called getDataElements on parts of the sample model but then I got in trouble because the scanlinestride had the wrong value. My understanding is that the optimization in setDataElements should only be local to this method and not modify the data layout.

ingo

Thomas Fitzsimmons wrote:
On Mon, 2004-04-05 at 11:02, Ingo PrÃtel wrote:

Note new attachment.

Ingo PrÃtel wrote:

I suggest the following patch:

2004-04-05 Ingo Proetel <[EMAIL PROTECTED]>

* java/awt/image/ComponentSampleModel.java (setDataSamples):Do not reset scanline stride.





    if (scanlineStride == rowSize)
      {
       // Collapse scan lines:
-       scanlineStride = rowSize *= h;
+       rowSize *= h;
       h = 1;
      }


Can you accompany your patches with a description of the problem they
solve?  What's the rationale for this change?

Tom




-- Ingo PrÃtel [EMAIL PROTECTED] aicas GmbH http://www.aicas.com Haid-und-Neu-Str. 18 phone +49 721 663 968-32 76131 Karlsruhe fax +49 721 663 968-93 Germany


_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to