mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-24 22:02:44 -06:00
Image: begin/end
git-svn-id: svn://ultimatepp.org/upp/trunk@10462 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
04cba6245a
commit
955fcd35d0
3 changed files with 9 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ from various threads (CoWork is internally synchronized).&]
|
|||
global FIFO stack for 2048 scheduled jobs. When there is no slot
|
||||
available when scheduling the job, it is performed immediately
|
||||
by Do. Finish method has to wait until all jobs scheduled by
|
||||
CoWork.instance are finished, while waiting it attempts to perform
|
||||
CoWork instance are finished, while waiting it attempts to perform
|
||||
scheduled jobs from the same instance. That way work always progresses
|
||||
even if there is shortage of worker threads.&]
|
||||
[s0;%% &]
|
||||
|
|
@ -46,7 +46,7 @@ tatic] [@(0.0.255) bool]_[* TrySchedule]([@(0.0.255) const]_[_^Upp`:`:Function^
|
|||
[s2;%% This is a low`-level function that attempts to schedule [%-*@3 fn]
|
||||
to be executed by worker thread. Returns true if [%-*@3 fn] was
|
||||
scheduled, false if not (in case there is no slot left in scheduling
|
||||
stacks). Not that this function only schedules the function,
|
||||
stacks). Note that this function only schedules the function,
|
||||
the exact time of execution is unknown.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
|
|
|
|||
|
|
@ -185,7 +185,9 @@ public:
|
|||
int GetResolution() const;
|
||||
|
||||
const RGBA *Begin() const { return data ? ~data->buffer : NULL; }
|
||||
const RGBA *begin() const { return Begin(); }
|
||||
const RGBA *End() const { return Begin() + GetLength(); }
|
||||
const RGBA *end() const { return End(); }
|
||||
const RGBA* operator~() const { return Begin(); }
|
||||
operator const RGBA*() const { return Begin(); }
|
||||
const RGBA* operator[](int i) const { ASSERT(data); return data->buffer[i]; }
|
||||
|
|
|
|||
|
|
@ -88,11 +88,15 @@ for future use and returned.&]
|
|||
[s4; &]
|
||||
[s5;:Image`:`:Begin`(`)const: [@(0.0.255) const]_[_^RGBA^ RGBA]_`*[* Begin]()_[@(0.0.255) con
|
||||
st]&]
|
||||
[s5;:Upp`:`:Image`:`:begin`(`)const: [@(0.0.255) const]_[_^Upp`:`:RGBA^ RGBA]_`*[* begin]()
|
||||
_[@(0.0.255) const]&]
|
||||
[s2;%% Returns a pointer to the first pixel.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Image`:`:End`(`)const: [@(0.0.255) const]_[_^RGBA^ RGBA]_`*[* End]()_[@(0.0.255) const]&]
|
||||
[s2;%% Returns Begin() `+ GetLength().&]
|
||||
[s5;:Upp`:`:Image`:`:end`(`)const: [@(0.0.255) const]_[_^Upp`:`:RGBA^ RGBA]_`*[* end]()_[@(0.0.255) c
|
||||
onst]&]
|
||||
[s2;%% Returns begin() `+ GetLength().&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Image`:`:GetSerialId`(`)const: [_^int64^ int64]_GetSerialId()[@(64) _][@(0.0.255) cons
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue