54990 Commits

Author SHA1 Message Date
Dario Casalinuovo
40de3cd148 BMediaRoster: Definitely undertake the MediaRosterUndertaker
* On a more deep analysis i figured out that other than being
  a bad pratice quitting the BLooper explicitly was cause of
  more problems, such as the regression after my patches which
  led to have a zombie media_addon_server after media services
  restart. This should hopefully place a final stone on the
  BMediaRoster::Quit() issue as with the previous commit
  i've removed every attempt to do this in the system. For
  any application developer listening, this means that quitting
  the BMediaRoster is highly discouraged, don't do it.
hrev49465
2015-07-27 18:28:57 +02:00
Dario Casalinuovo
3f5483c79b desklink: Fix problems with BMediaRoster Quit
* Improved the situation so that it should be always
  synchronized. Improved error message, and detection
  of media services not being run.
2015-07-27 18:28:53 +02:00
Rene Gollent
9123fde7b9 Debugger: Implement #9783.
TeamDebugger:
- When we're notified that the target team has called exec(), take all
  necessary steps to prepare. These include saving settings for the old
  team, clearing out breakpoints, resetting signal dispositions, and
  removing the old team's image list. Also set a flag indicating an exec
  is pending for later processing.
- On image load notification, if the pending flag is set, check if the
  new image is the app image, and if so update the team's name to
  the new image, load that respective team's settings, and set a
  temporary breakpoint in its main() so the user has a chance to
  perform any additional desired actions before starting execution
  in the new executable.
hrev49464
2015-07-26 14:37:28 -04:00
Rene Gollent
10bbf8cb8d Debugger: TeamWindow refactor.
- When asked to load settings, post a message and do so in the window's
  message loop. This avoids a lock order reversal when asked to do so
  later as a result of exec() changing the target image out.
2015-07-26 14:37:28 -04:00
Rene Gollent
754b42a5a1 Debugger: Add rename event for Team.
Team:
- Add listener hook and event type for rename events. These occur on exec()
  since at this point we're running a different executable.

TeamWindow:
- Factor out code for generating window title into a helper, and use from both
  window initialization and newly implemented rename listener hook.
2015-07-26 14:37:27 -04:00
Rene Gollent
25c638c20b Debugger: Adjust ThreadHandler.
- SetBreakpointAndRun() now takes an additional argument indicating if this
  invocation is for a fresh run of a team or not, as continuing the thread's
  execution needs to be done differently in the two cases.
2015-07-26 14:37:26 -04:00
Rene Gollent
8f21b17520 Debugger: Add more helpers to Team.
ClearImages():
- Removes all existing images from the team's image list and notifies callers.
  To be used in case of an exec().

ClearSignalDispositionMappings():
- Remove any existing custom signal disposition mappings. This is intended to
  be used in preparation for loading new ones from a team after exec() is
  called.
2015-07-26 14:37:26 -04:00
Adrien Destugues
209cd3dd4f Remove second half of useless condition.
Thanks to Ingo for reviewing!
hrev49463
2015-07-26 20:31:10 +02:00
Adrien Destugues
58164f4a49 PVS 122,123: useless checks. hrev49462 2015-07-26 16:57:10 +02:00
Adrien Destugues
7895cfc69b PVS 114: useless check.
We return a few line above if err is != 0.
2015-07-26 16:57:09 +02:00
Adrien Destugues
0e17424c6f PVS 112: check result of memcmp against 0. 2015-07-26 16:57:07 +02:00
Adrien Destugues
3ec6800839 PVS 109: useless check
error was already checked one line above.
2015-07-26 16:57:06 +02:00
Adrien Destugues
2f8639483a PVS 170: use boolean for if comparison
Direct use of strcmp result in if is against our coding style.
2015-07-26 16:57:05 +02:00
Adrien Destugues
67d9a9cb16 PVS 104: duplicate if check. 2015-07-26 16:57:03 +02:00
Adrien Destugues
c13e346a48 PVS 95-103: useless error checks
These conditions were always true, remove them.
2015-07-26 16:57:02 +02:00
Adrien Destugues
69ee6a6d62 PVS 78-85: useless checks
* These were always true, so remove them.
2015-07-26 16:57:01 +02:00
Adrien Destugues
32a6b04592 PVS76: useless check of null pointer
Refactor BResources::WriteResource to return early in case of errors,
instead of checking permanently if (error == B_OK). Makes the code more
readable and removes some useless checks.
2015-07-26 16:56:59 +02:00
Alexander von Gluck IV
89de782660 test/kits/net: Fix build of cookie_test hrev49461 2015-07-26 09:55:45 -05:00
Alexander von Gluck IV
eef1c442a3 test/kits/net: Fix build of NetEndpointTest hrev49460 2015-07-26 09:47:50 -05:00
Jérôme Duval
2a868d7645 glibc: replace extern __inline with __extern_inline.
* this helps to comply with C99. As a reminder, some of these headers
are also used by x86_gcc2 src/libs/stdc++.
hrev49459
2015-07-26 10:09:22 +02:00
Jérôme Duval
189156a069 Boot stdio.h: define a bunch of functions required by c++ headers. 2015-07-26 10:07:21 +02:00
Jérôme Duval
4fb4b32043 Force use of std::isnan() in agg_conv_curve.h.
cmath could be included before inclusion of this header, thus undefining isnan.
hrev49458
2015-07-25 23:42:14 +02:00
Jérôme Duval
9cd62a24e5 Fixed C++11 warnings.
invalid suffix on literal; C++11 requires a space between literal and string macro
[-Werror=literal-suffix]
2015-07-25 23:42:13 +02:00
Jérôme Duval
66fdfe3270 setmime: hash() conflicts with std::hash.
* found with GCC6
2015-07-25 23:42:13 +02:00
Jérôme Duval
d0017f3766 libtracker.so: fixed parenthesis warning on not operator...
* "logical not is only applied to the left hand side of comparison"
* found with GCC6
2015-07-25 23:42:13 +02:00
Jérôme Duval
b2a0b6323e screenshot: fixed parenthesis warning on not operator...
* "logical not is only applied to the left hand side of comparison"
* found with GCC6
2015-07-25 23:42:12 +02:00
Markus Himmel
5dab45be76 Screenshot: Fix aspect ratio.
The aspect ratio of the preview was wrong for two reasons:
 * The height of the preview was always assumed to be 150 while it actually
   depends on the layout.
 * The size was then only set using SetExplicitMinSize(), which is not
   sufficient to actually change the size to the desired value.

Fixes #11644.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
hrev49457
2015-07-25 17:26:55 -04:00
Augustin Cavalier
d6f83df4bb servers/net: DHCPClient: Hard-code the message IDs.
Even though C++ should increment the enum for us, since these IDs
are set and used by things outside of this file, we should hard-code
the numbers.

No functional change (or if there is, it means there's a compiler bug
somewhere.)
hrev49456
2015-07-25 11:11:03 -04:00
Augustin Cavalier
971f8f5041 partitioning_systems/gpt: Make _IsHeaderValid and _ValidateHeaderCRC static.
Thanks to Pawel for reviewing!
2015-07-25 11:04:59 -04: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
Augustin Cavalier
ca8ed5ea66 index_server: Fix the build.
Partially based on a patch from Paradoxianer. Thanks!
hrev49455
2015-07-25 10:33:45 -04:00
Julian Harnath
d56beda4d8 app_server: optional coordinate shifting in renderer_region
* agg::renderer_region gets an extra feature which allows to
  optionally shift the coordinates by a specified offset.

* This allows to shift coordinates at the lowest level, even below
  the transformations done by BAffineTransform (which happen in the
  painter, right before rasterization).

  Needed for layers support: shifts the origin of the layer bitmaps
  to their position in the view while keeping all transformations
  (BView origin/scale transforms as well as BAffineTransforms)
  intact. The offset for the layer bitmaps within their parent view
  is determined by the bounding box and is then fixed, it must not
  be altered while the layer's BPicture is played into the bitmap.

  If this offset were added to the BView origin or as translation in
  the BAffineTransform, it would be further transformed by the BView
  scale or the other affine transform parameters. Thus, we need
  another low-level offset mechanism which is even below
  BAffineTransform's transformations.
2015-07-25 16:31:20 +02:00
Julian Harnath
cd621b9585 app_server: add method to shift alpha masks
* Allow shifting the offset of alpha masks without changing the size.
  Ideally, we only need to reattach the buffer in the shifted
  position, saving the work of reallocating and redrawing the mask
  picture. Needed for layers support.
2015-07-25 16:31:20 +02:00
Julian Harnath
6ac468ef24 app_server: add support for uniform opacity alpha masks
* Another constructor for AlphaMask allows creating a mask with no
  picture, it will simply be a single uniform alpha value over the
  whole mask.

* No need to even allocate a buffer in this case, we can just use
  the feature of clipped_alpha_mask to define an opacity for outside
  the mask, and set the buffer size to zero.
2015-07-25 16:31:20 +02:00
Julian Harnath
edc0b5e9db app_server: allow disabling affine transforms in DrawState
* New method DrawState::SetTransformEnabled allows to temporarily
  disable all BAffineTransforms in the state stack (up to 'this').
  Later, the same method can be used to reenable the transforms.

  Needed for layers support: when drawing the finished layer bitmap
  onto the view, the affine transforms must not be applied again --
  they have already been applied while drawing the bitmap's contents.
2015-07-25 16:31:20 +02:00
Julian Harnath
65a54d2892 app_server: implement setting BAffineTransforms in BPicture
* Add a simple callback for the picture command
2015-07-25 16:31:20 +02:00
Julian Harnath
b5c7f936de app_server: allow replacing the DrawState in a Canvas
* Needed for layers support. The previously set DrawState and its
  stack predecessors are not freed, so take care to not leak memory
  when using this.
2015-07-25 16:31:20 +02:00
Julian Harnath
c34cbf2878 app_server: fix PicturePlayer dummy function table
* With the support for BAffineTransform, it needs to have 49 entries
2015-07-25 16:31:20 +02:00
Julian Harnath
ae0468762f app_server: add Canvas::PenToLocalTransform 2015-07-25 16:31:20 +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
1b4dba929d app_server: add picture player for determining bounding box
* Add PictureBoundingBoxPlayer, a new player for BPictures. Instead
  of drawing the picture, it determines an approximate bounding box
  of its contained drawing operations.

* To increase performance, the resulting bounding box is an
  approximation: it guarantees to always enclose all pixels of the
  picture, however not necessarily tightly.

* PictureBoundingBoxPlayer::Play() gets a DrawState which is the
  initial state used when playing the picture. The player does not
  modify this state (it uses a copy internally), so the method is
  idempotent.
2015-07-25 16:31:20 +02:00
Julian Harnath
ccaee9e818 app_server: add Squash method in DrawState
* New method DrawState::Squash() uses the combined scale, origin and
  transform as the state's own scale, origin, transform.

  This can be used when making copies of DrawStates which have
  previous states below them in the state stack. The top of stack
  DrawState can be copied, squashed and then used just like the
  original one with the whole stack below it (except of course
  when trying to pop off any earlier state).
2015-07-25 16:31:19 +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
6f2a446e2e app_server: extract coordinate conversion class
* Move coordinate conversion into a new class SimpleTransform. It
  supports scaling and translation which is sufficient for conversion
  between screen, local and pen (drawing) coordinates.

* Because all the overloaded methods for converting
  BPoint/BRect/BRegion/etc are now within the single SimpleTransform
  class, the interfaces of Canvas, View, DrawState, etc. are slimmed
  down. These classes have too many responsibilities, so some will be
  factored out into separate classes, this being the first.
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
Andrew Lindesay
3860139319 hvif2png: Fix build on Mac OS X.
* Add support for macports lib and headers dirs.
 * Link libs change for Mac OS X for tool build.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-07-25 10:23:24 -04:00
Josef Gajdusek
4a839f2daa partitioning_systems/gpt: Fix _IsHeaderValid().
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
hrev49454
2015-07-25 10:15:24 -04:00
Augustin Cavalier
e4b8ed4a85 images/regular: Delete DVB stuff.
Thanks to Axel for reviewing!
2015-07-25 10:05:00 -04:00
autonielx
5d8a237146 Update translations from Pootle hrev49453 2015-07-25 06:38:39 +02:00
Rene Gollent
3bb17aa98a Debugger: Minor refactoring.
VariablesView:
- Factor out setting up a variable edit request into a helper function.
Adjust table node invocation accordingly.
- Add Edit variable context menu item if appropriate.
hrev49452
2015-07-24 23:38:04 -04:00