[squeak-dev] The Trunk: Graphics-pre.405.mcz
ma.chris.m at gmail.com
Tue Oct 16 21:27:47 UTC 2018
Hi Tobias and all,
Could I ask you all to please get behind the administrator (me) who
volunteers his time to understand and maintain the health of our code
repository to ensure continuous service to the Squeak community? A
commit that violates 5 of 7 guidelines is not "okay", it's actually a
kind of a slap in the face, after which I have to go clean it up, and
then get told I'm "gambling", which is total nonsense and another
The best way to achieve what you wish is to respect the trunk and its
commit rules and guidelines, and get other committers to do the same.
On Tue, Oct 16, 2018 at 3:00 PM Tobias Pape <Das.Linux at gmx.de> wrote:
> > On 16.10.2018, at 21:46, Chris Muller <asqueaker at gmail.com> wrote:
> > I've gone and moved these two inadvertent commits to the Treated Inbox.
> Chris, can we please NOT do that?
> There was a commit, there was a revert.
> That's ok, let us live with that.
> Let's please not gamble with the history except for really severe stuff.
> > If you'd already updated your trunk image in the last few hours,
> > revert your image to Graphics-pre.403.
> > Since we're starting fresh on a new development cycle, please take
> > this opportunity to review Guidelines for Core Developers for Trunk
> > submissions:
> > http://wiki.squeak.org/squeak/3279
> > Regards,
> > Chris
> > ___________________
> > 1. Commit it to the Inbox first.
> > 2. Regard the code repository with equal respect to the image, for
> > example, by avoiding unnecessary litter and bloat.
> > 3. Never only change formatting, and even avoid changing prior
> > developers formatting when making only minor changes to a method.
> > 4. Give your peers a chance to review, commit to the Inbox first.
> > 5. Never commit same-day code. Think about it and live with it for at
> > least a few days first.
> > 6. Share it with others for extra review eyes. The Inbox is a great
> > way to do this.
> > 7. Only commit meaningful changes like a fix or improvement, not
> > merely a spelling or comment fix. Gather those up to include the next
> > time there is a meaningful change to that package.
> > On Tue, Oct 16, 2018 at 11:08 AM <commits at source.squeak.org> wrote:
> >> Patrick Rein uploaded a new version of Graphics to project The Trunk:
> >> http://source.squeak.org/trunk/Graphics-pre.405.mcz
> >> ==================== Summary ====================
> >> Name: Graphics-pre.405
> >> Author: pre
> >> Time: 16 October 2018, 5:07:10.382369 pm
> >> UUID: 75b41799-4dd2-7a44-b98f-89612c4d7af9
> >> Ancestors: Graphics-pre.404
> >> Restores the 32bit black-transparent conversion. The corresponding test has been adapted and set to be an expected failure as the behavior should be tackled for 32bit at one point. The inconsistency results in major issues when working with forms resulting from loading pictures from external resources. An alternative approach would require changing all methods creating forms from external sources, although that would destroy color information.
> >> =============== Diff against Graphics-pre.404 ===============
> >> Item was changed:
> >> ----- Method: Color class>>colorFromPixelValue:depth: (in category 'instance creation') -----
> >> colorFromPixelValue: p depth: d
> >> "Convert a pixel value for the given display depth into a color."
> >> "Details: For depths of 8 or less, the pixel value is simply looked up in a table. For greater depths, the color components are extracted and converted into a color."
> >> | r g b alpha |
> >> d = 8 ifTrue: [^ IndexedColors at: (p bitAnd: 16rFF) + 1].
> >> d = 4 ifTrue: [^ IndexedColors at: (p bitAnd: 16r0F) + 1].
> >> d = 2 ifTrue: [^ IndexedColors at: (p bitAnd: 16r03) + 1].
> >> d = 1 ifTrue: [^ IndexedColors at: (p bitAnd: 16r01) + 1].
> >> (d = 16) | (d = 15) ifTrue: [
> >> "five bits per component"
> >> r := (p bitShift: -10) bitAnd: 16r1F.
> >> g := (p bitShift: -5) bitAnd: 16r1F.
> >> b := p bitAnd: 16r1F.
> >> (r = 0 and: [g = 0]) ifTrue: [
> >> b = 0 ifTrue: [^Color transparent].
> >> b = 1 ifTrue: [^Color black]].
> >> ^ Color r: r g: g b: b range: 31].
> >> d = 32 ifTrue: [
> >> "eight bits per component; 8 bits of alpha"
> >> r := (p bitShift: -16) bitAnd: 16rFF.
> >> g := (p bitShift: -8) bitAnd: 16rFF.
> >> b := p bitAnd: 16rFF.
> >> alpha := p bitShift: -24.
> >> alpha = 0 ifTrue: [^Color transparent].
> >> + (r = 0 and: [g = 0 and: [b = 0]]) ifTrue: [^Color transparent].
> >> alpha < 255
> >> ifTrue: [^ (Color r: r g: g b: b range: 255) alpha: (alpha asFloat / 255.0)]
> >> ifFalse: [^ (Color r: r g: g b: b range: 255)]].
> >> d = 12 ifTrue: [
> >> "four bits per component"
> >> r := (p bitShift: -8) bitAnd: 16rF.
> >> g := (p bitShift: -4) bitAnd: 16rF.
> >> b := p bitAnd: 16rF.
> >> ^ Color r: r g: g b: b range: 15].
> >> d = 9 ifTrue: [
> >> "three bits per component"
> >> r := (p bitShift: -6) bitAnd: 16r7.
> >> g := (p bitShift: -3) bitAnd: 16r7.
> >> b := p bitAnd: 16r7.
> >> ^ Color r: r g: g b: b range: 7].
> >> self error: 'unknown pixel depth: ', d printString
> >> !
More information about the Squeak-dev