classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for java.awt.image.ComponentSampleModel


From: Ingo Prötel
Subject: Re: Patch for java.awt.image.ComponentSampleModel
Date: Wed, 07 Apr 2004 08:59:44 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

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  <address@hidden>

* 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                                          address@hidden
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]