[haiku-commits] haiku: hrev47028 - src/kits/interface headers/build src/servers/app headers/private/app

  • From: superstippi@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 17 Mar 2014 22:59:09 +0100 (CET)

hrev47028 adds 2 changesets to branch 'master'
old head: 55f7180dc880ec9410d8db05f1bc39287889a024
new head: 244796701b8c8768712cdaf6d1fb0690f2c05d08
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=2447967+%5E55f7180

----------------------------------------------------------------------------

6d19a82: Don't define B_SPINLOCK_INITIALIZER for test app_server
  
   * I don't know what I am doing here, but the test app_server only
     ever built for me recently when I disabled the define, so I might
     as well commit this...

2447967: app_server: store and restore fill rule...
  
  ...when sending the whole view state over the link.
  Also inherit the fill rule when pushing states (DrawState
  copy constructor). A somewhat sloppy oversight, I must add.

                                      [ Stephan Aßmus <superstippi@xxxxxx> ]

----------------------------------------------------------------------------

4 files changed, 9 insertions(+), 2 deletions(-)
headers/build/HaikuBuildCompatibility.h     | 3 ++-
headers/private/app/ServerProtocolStructs.h | 1 +
src/kits/interface/View.cpp                 | 4 +++-
src/servers/app/DrawState.cpp               | 3 +++

############################################################################

Commit:      6d19a82f63039b5f2c67d4455c15302ac4b439cd
URL:         http://cgit.haiku-os.org/haiku/commit/?id=6d19a82
Author:      Stephan Aßmus <superstippi@xxxxxx>
Date:        Mon Mar 17 21:54:19 2014 UTC

Don't define B_SPINLOCK_INITIALIZER for test app_server

 * I don't know what I am doing here, but the test app_server only
   ever built for me recently when I disabled the define, so I might
   as well commit this...

----------------------------------------------------------------------------

diff --git a/headers/build/HaikuBuildCompatibility.h 
b/headers/build/HaikuBuildCompatibility.h
index 38b5197..3b438fa 100644
--- a/headers/build/HaikuBuildCompatibility.h
+++ b/headers/build/HaikuBuildCompatibility.h
@@ -72,7 +72,8 @@ typedef int socklen_t;
 #      define B_FIRST_REAL_TIME_PRIORITY B_REAL_TIME_DISPLAY_PRIORITY
 #endif
 
-#ifndef B_SPINLOCK_INITIALIZER
+#if !defined(HAIKU_TARGET_PLATFORM_LIBBE_TEST)
+       && !defined(B_SPINLOCK_INITIALIZER)
 #      define B_SPINLOCK_INITIALIZER 0
 #endif
 

############################################################################

Revision:    hrev47028
Commit:      244796701b8c8768712cdaf6d1fb0690f2c05d08
URL:         http://cgit.haiku-os.org/haiku/commit/?id=2447967
Author:      Stephan Aßmus <superstippi@xxxxxx>
Date:        Mon Mar 17 21:55:47 2014 UTC

app_server: store and restore fill rule...

...when sending the whole view state over the link.
Also inherit the fill rule when pushing states (DrawState
copy constructor). A somewhat sloppy oversight, I must add.

----------------------------------------------------------------------------

diff --git a/headers/private/app/ServerProtocolStructs.h 
b/headers/private/app/ServerProtocolStructs.h
index 8534733..8eec0aa 100644
--- a/headers/private/app/ServerProtocolStructs.h
+++ b/headers/private/app/ServerProtocolStructs.h
@@ -26,6 +26,7 @@ struct ViewSetStateInfo {
        join_mode                                       lineJoin;
        cap_mode                                        lineCap;
        float                                           miterLimit;
+       int32                                           fillRule;
        source_alpha                            alphaSourceMode;
        alpha_function                          alphaFunctionMode;
        bool                                            fontAntialiasing;
diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp
index c7395dd..0371f41 100644
--- a/src/kits/interface/View.cpp
+++ b/src/kits/interface/View.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2013 Haiku, Inc. All rights reserved.
+ * Copyright 2001-2014 Haiku, Inc. All rights reserved.
  * Distributed under the terms of the MIT License.
  *
  * Authors:
@@ -227,6 +227,7 @@ ViewState::UpdateServerState(BPrivate::PortLink &link)
        info.lineJoin = line_join;
        info.lineCap = line_cap;
        info.miterLimit = miter_limit;
+       info.fillRule = fill_rule;
        info.alphaSourceMode = alpha_source_mode;
        info.alphaFunctionMode = alpha_function_mode;
        info.fontAntialiasing = font_aliasing;
@@ -291,6 +292,7 @@ ViewState::UpdateFrom(BPrivate::PortLink &link)
        line_join = info.viewStateInfo.lineJoin;
        line_cap = info.viewStateInfo.lineCap;
        miter_limit = info.viewStateInfo.miterLimit;
+       fill_rule = info.viewStateInfo.fillRule;
        alpha_source_mode = info.viewStateInfo.alphaSourceMode;
        alpha_function_mode = info.viewStateInfo.alphaFunctionMode;
        font_aliasing = info.viewStateInfo.fontAntialiasing;
diff --git a/src/servers/app/DrawState.cpp b/src/servers/app/DrawState.cpp
index 6d1dd32..23c358f 100644
--- a/src/servers/app/DrawState.cpp
+++ b/src/servers/app/DrawState.cpp
@@ -92,6 +92,7 @@ DrawState::DrawState(const DrawState& other)
        fLineCapMode(other.fLineCapMode),
        fLineJoinMode(other.fLineJoinMode),
        fMiterLimit(other.fMiterLimit),
+       fFillRule(other.fFillRule),
 
        // Since fScale is reset to 1.0, the unscaled
        // font size is the current size of the font
@@ -223,6 +224,7 @@ DrawState::ReadFromLink(BPrivate::LinkReceiver& link)
        fLineJoinMode = info.lineJoin;
        fLineCapMode = info.lineCap;
        fMiterLimit = info.miterLimit;
+       fFillRule = info.fillRule;
        fAlphaSrcMode = info.alphaSourceMode;
        fAlphaFncMode = info.alphaFunctionMode;
        fFontAliasing = info.fontAntialiasing;
@@ -287,6 +289,7 @@ DrawState::WriteToLink(BPrivate::LinkSender& link) const
        info.viewStateInfo.lineJoin = fLineJoinMode;
        info.viewStateInfo.lineCap = fLineCapMode;
        info.viewStateInfo.miterLimit = fMiterLimit;
+       info.viewStateInfo.fillRule = fFillRule;
        info.viewStateInfo.alphaSourceMode = fAlphaSrcMode;
        info.viewStateInfo.alphaFunctionMode = fAlphaFncMode;
        info.viewStateInfo.fontAntialiasing = fFontAliasing;


Other related posts:

  • » [haiku-commits] haiku: hrev47028 - src/kits/interface headers/build src/servers/app headers/private/app - superstippi