[haiku-commits] Re: BRANCH looncraz-github.CAP-volatile - in src/servers/app: . drawing

  • From: Axel DÃrfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 09 Nov 2012 17:20:57 +0100

Am 09/11/2012 06:49, schrieb looncraz-github.CAP-volatile:
+// #pragma mark ConvertToWindow
+
+/*

Two blank lines.
The proper doxygen comment start is '/*!' followed by a tab and the text (ie. no extra newline).

+       Convert[[To][From]]Window identified as bottleneck during high-intesnity
+       drawing sessions.  Not because they were slow so much, but because they
+       were called many many times.  In fact, Just brining up the Desktop,
+       Deskbar, and a single simple window results in ~10,000 calls < 2secs.
+
+       As such, these functions have been optimized by caching the offset to
+       the window - as it is unlikely to change often - if at all.
+*/
+
+void

No blank line here.

+// #pragma mark ConvertFromWindow
+
+void

Two blank lines.

+}
+
+
+
+void
+View::ConvertFromWindow(IntRect* rect) const
+{
+       const BPoint& offset = _GetOffsetFromWindow();
+       rect->OffsetBy(-offset);
+}
+
+
+
+void

Only two blank lines (this and other places).

+       if (fWindow)
+               fWindow->ConvertForDrawing(point);

Please use (fWindow != NULL).

Bye,
   Axel.


Other related posts: