Commit Graph

402 Commits

Author SHA1 Message Date
Augustin Cavalier
b6f76ebe71 s/OpenBeOS License/MIT License/ universally, as they're the same thing.
Fixes #8681.
2017-02-09 22:09:56 -05:00
Adrien Destugues
884412df8e Fix test_app_server build, again
- Interface Kit tests use a View class which is not BView, and has no
SetViewUIColor.
- Libexpat is now in a separate package.
- Shouldn't we add this to the buildbots so we can cath the breakage?
2016-02-14 21:12:33 +01:00
Rene Gollent
8028ede7db Build: Add architecture rule for libshared.a.
- As suggested by Ingo, add libshared.a to the architecture name map.
  This allows it to be linked by its short name like other frequently
  used libraries.
- Adjust all Jamfiles referencing the lib accordingly.
2016-01-15 21:12:24 -05:00
looncraz
d231c2a7a5 tests: Convert to using Set*UIColor.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0018-0019 from looncraz.
2016-01-04 07:15:57 -05:00
Julian Harnath
345d9bb4a2 test_app_server: fix build 2015-11-18 14:04:19 +01:00
Julian Harnath
6109a2086d Merge branch 'app_server'
Conflicts:
	src/kits/interface/PicturePlayer.cpp
	src/servers/app/ServerPicture.cpp

In addition, the following files were also adapted to master branch
BPicture changes during the merge:
	src/kits/interface/PicturePlayer.h
	src/servers/app/PictureBoundingBoxPlayer.cpp
2015-11-10 23:09:54 +01:00
Simon South
1a28be27e8 Fix unittests build.
Signed-off-by: John Scipione <jscipione@gmail.com>
2015-10-27 10:28:36 -07:00
Axel Dörfler
d9bb9513c5 launch_daemon: "file_exists" now resolves $HOME, and '~'. 2015-10-19 21:22:21 +02:00
Julian Harnath
e3d7394869 app_server: fix test-app_server for launch_daemon changes
* Make test-app_server work again in a launch_daemon environment

* test_registrar gets a separate signature and port name again so the
  host system can distinguish it from the system registrar

* AppServer is normally a BServer now, however, there can't be two
  BApplications in one team. A class TestServerLoopAdapter is added,
  which becomes the base class of AppServer instead of BServer when
  compiling for libbe_test. It's an adapter class which looks towards
  AppServer as it if was a BServer, but internally it is derived from
  MessageLooper (like the old AppServer before the transition to
  BServer).

  This way, AppServer can stay a BServer in normal builds and it also
  avoids having to use too many #ifdefs to distinguish the two
  versions.
2015-08-23 01:00:32 +02:00
Julian Harnath
551438b9be app_server: add new BView layers API
* Add new methods
    BView::BeginLayer(uint8 opacity)
    BView::EndLayer()

* All drawing between begin and end of a layer is redirected onto an
  intermediate bitmap. When ending the layer, this bitmap is
  composited onto the view with the opacity given when the layer was
  started.

* Layers can be nested arbitrarily and will be blended onto each
  other in order. There can also be any arbitrary interleaving of
  layer begin/end and drawing operations.

* Internally, drawing commands are redirected into a BPicture between
  BeginLayer and EndLayer (but client code need not know or care
  about this). Client code can also start/end other BPictures while
  inside a layer.

* Uses the PictureBoundingBoxPlayer to determine the size of the
  layer bitmap before allocating and drawing into it, so it does not
  allocate more memory than necessary and -- more importantly -- it
  will not alpha-composite more pixels than necessary.

* Drawing mode is always set to B_OP_ALPHA, blend mode to
  (B_PIXEL_ALPHA, B_ALPHA_COMPOSITE) while inside layers. This is
  necessary for (a) correct compositing output and (b) for
  redirection of drawing into the intermediate bitmap, which uses the
  renderer_region offset (in B_OP_COPY, the Painter does not use the
  AGG renderer methods, it directly accesses the pixel data. This
  would access out-of-bounds without the offset, so B_OP_COPY cannot
  be allowed.)
  To ensure these modes aren't changed, BView::SetDrawingMode()
  and BView::SetBlendingMode() are ignored while inside a layer.

* The main motivation behind this new API is WebKit, which internally
  expects such a layers functionality to be present. A performant and
  reusable implementation of this functionality can only be done
  server-side in app_server.
2015-07-25 16:35:52 +02:00
Julian Harnath
8511f6ac9b app_server: fix ServerPicture::SyncState pen size
* Should use the unscaled pen size here because we also write down
  the current scale, and we don't want to scale the pen twice.
2015-07-25 16:31:20 +02:00
Julian Harnath
ad53a0d999 app_server: add unit test add-on, test for SimpleTransform
* app_server currently does not have any real unit tests, making
  changes more difficult and riskier. A new directory unit_tests with
  a test add-on is added in app_server's tetsts directory to hold
  future unit tests.

* Add test for SimpleTransform class
2015-07-25 16:31:19 +02:00
Julian Harnath
ab1bd2fd07 app_server: rename DrawingContext to Canvas
* Better reflects the purpose of the class: an interface for things
  in which we can draw (e.g. a View)

* Accordingly rename OffscreenContext to OffscreenCanvas
2015-07-25 16:30:29 +02:00
Axel Dörfler
d54bb194d7 launch_daemon: Empty conditions are now NULL.
* Instead of an empty and-condition.
2015-07-22 20:45:06 +02:00
Axel Dörfler
95d93d2ea9 launch_daemon: Fixed empty on/if parsing.
* An extra empty message was mistakenly created.
2015-07-22 20:45:02 +02:00
Axel Dörfler
5a76694819 launch_daemon: Added events parsing.
* Including tests, also for the environment parsing.
2015-07-22 20:44:34 +02:00
Axel Dörfler
3888dd6e73 launch_daemon: Fixed condition tests build.
* ConditionContext changed.
2015-07-22 20:44:30 +02:00
Axel Dörfler
e0fc09b439 launch_daemon: Conditions now know if they are constant.
* This allows to remove a job in the init phase already, if its
  condition is not only constant, but also failing.
* Also removed the special Job::LaunchInSafeMode() method; this is now
  done using the conditions (the config option no_safemode remains,
  though).
2015-07-22 20:43:13 +02:00
Axel Dörfler
004cd6709d launch_daemon: Added run directive.
* Allows to conditionally (or unconditionally) launch targets.
* Including tests for the settings parser.
* FirstBootPrompt is now launched when deemed necessary (as in
  the Bootscript).
2015-07-22 20:43:08 +02:00
Axel Dörfler
0e347cb203 launch_daemon: Added condition tests. 2015-07-22 20:42:54 +02:00
Axel Dörfler
1e9c987102 launch_daemon: Added basic support for conditions.
* Admittedly not very well thought out, but it should be good
  enough for now; it doesn't really make sense to initialize jobs
  that is never run due to failed conditions.
* Job, and Target now have a common base class BaseJob that deals
  with the conditions.
2015-07-22 20:42:41 +02:00
Axel Dörfler
f7cf381a14 launch_daemon: Completed condition parser. 2015-07-22 20:42:36 +02:00
Axel Dörfler
e73c936699 launch_daemon: Started working on condition parsing.
* Moved related test code from DriverSettingsMessageAdapterTest to the
  SettingsParser class.
* Added SettingsParserTest class -- most tests already succeed, but not
  all; support for the flattened "not" is not working yet.
2015-07-22 20:42:32 +02:00
Adrien Destugues
96bac1b30b Add a test for #2945. 2014-12-05 14:51:47 +01:00
Adrien Destugues
afc5d438a7 Add an app server test for stack&tile
Should help with debugging #8569.
2014-10-29 22:22:15 +01:00
Adrien Destugues
fe86832391 Put liblinprog after libstackandtile
Otherwise some symbols go missing...
2014-10-06 17:43:21 +02:00
Adrien Destugues
a166264bf3 test_app_server: use libstackandtile.
We build a static lib for it, so we may as well use it.
2014-10-06 17:32:53 +02:00
Oliver Tappe
220d040227 Use libstdc++, libsupc++ and libgcc from gcc_syslibs.
* Instead of faking libstdc++.so from libstdc++.a, use libstdc++.so
  from the gcc_syslibs build feature for everything except x86_gcc2.
* Use libgcc_s.so from the gcc_syslibs build feature for everything but
  x86_gcc2 (which still carries libgcc as part of libroot.so).
* Drop filtering of libgcc objects for libroot, as that is no longer
  necessary since we're only using libgcc-as-single-object for libroot
  with x86_gcc2, where the filtered object file doesn't exist. Should
  the objects that used to be filtered cause any problems as part of
  libgcc_s.so, we can always filter them as part of the gcc build.
* Use libsupc++.so from the gcc_syslibs build feature for everything but
  x86_gcc2.
* Adjust all Jamfiles accordingly.
* Deactivate building of faked libstdc++.so for non-x86-gcc2. For
  x86_gcc2, we still build libstdc++.so from the sources in the Haiku
  source tree as part of the Haiku build .
* Put gcc_syslibs package onto the image, when needed.
2014-08-13 13:32:44 +02:00
Adrien Destugues
a694f30d6c Add more alpha gradient test cases
* Add a vertical linear gradient. This bypasses AGG and uses a faster
code path, which works.
* Add gradients drawn in a ClipToPicture() context. This uses an
* unpacked scanline rasterizer, which works.

This hints to the problem being the use of a packed scanline rasterizer,
with agg gradients touching the alpha channel.
2014-07-24 12:01:50 +02:00
Adrien Destugues
d1a5f90981 More test cases for gradients with alpha channel
* Swapping the opaque and transparent ends leads to different results,
* Linear gradients are also affected.
2014-07-23 17:59:37 +02:00
Adrien Destugues
5f6a39cabe Add testcase from #2946. 2014-07-23 16:24:08 +02:00
Adrien Destugues
1f3acfaa51 Add a test for radial gradients.
* This shows that the radius is ignored and all gradients are drwan with
a radius of 100.
2014-07-23 10:17:25 +02:00
Adrien Destugues
15db99249a Simple test harness for app_server tests
This was developped for the transformations test, but can be used for
other tests too. Extract the relevant classes to a separate file.
2014-07-23 10:14:35 +02:00
Adrien Destugues
c5ed108884 Fix the test_app_server build. 2014-07-23 10:13:58 +02:00
Adrien Destugues
7cd7f2fbf3 Remove test that can't work.
I didn't mean to commit this. Sorry again.
2014-07-21 10:21:32 +02:00
Adrien Destugues
043178a063 Add WizzNic
* Update sdl_image_x86 to a version that can load PNG files
* Update giflib_x86 to match what's required by the new SDL_image
package
2014-07-21 09:34:52 +02:00
Adrien Destugues
a4a2abe0d9 Test case for pixel alignment on transforms.
Transforming an aligned rectangle shifts it up and left by 0.5 pixels.
2014-05-26 10:06:42 +02:00
Stephan Aßmus
ae4fa7ce39 Transformation test: Refactored duplicated code. 2014-05-23 20:44:51 +02:00
Adrien Destugues
b6c34f4c44 Add a transform test for DrawString with offsets
* The text is not drawn at all when some transforms are used.
2014-05-23 15:07:19 +02:00
Adrien Destugues
569bd922a6 Add a test that shows bitmap being wrongly clipped.
* The bitmap should cover the same area as the rectangle, but it
doesn't.
2014-05-21 17:02:13 +02:00
Adrien Destugues
2f9ac9582d Transformation: add one more test
* Add test for a translation that makes things that are out of view
bounds to become visible
* Fix the "rectangles" test to handle scrolling of the view. It seems
that in some cases some of the rectangles are not drawn.

The gradient and bitmap tests currently have problem with view
scrolling, but I'm not sure why.
2014-05-19 14:18:57 +02:00
Stephan Aßmus
cb7de03cca test app_server: Fix build & add font spacing test. 2014-02-26 11:51:40 +01:00
Stephan Aßmus
8e8869a916 Fix more Freetype build feature dependencies in app_server 2014-02-20 17:10:37 +01:00
Stephan Aßmus
9f44851e0a Transformation: Added test for nesting view states.
The test shows that nesting view states seems to work as expected...
2014-02-06 21:28:17 +01:00
Stephan Aßmus
e966330c99 Transformation: Added gradient test. 2014-02-06 17:13:08 +01:00
Stephan Aßmus
05a19d4137 Transformation: Added BBitmap test 2014-02-06 16:28:16 +01:00
Stephan Aßmus
d93591ffb4 Slightly improve Transformation test to include text 2014-02-06 11:10:05 +01:00
Stephan Aßmus
08e109e570 New test for transformations 2014-02-06 11:10:03 +01:00
Stephan Aßmus
7bc9f84556 ClipToPicture test: Fixed nested states expected look. 2014-02-03 23:45:51 +01:00
Stephan Aßmus
b5364215d0 ClipToPicture: Correct the scaled clipping tests. 2014-02-01 23:22:23 +01:00