|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sunflow.Benchmark
public class Benchmark
Constructor Summary | |
---|---|
Benchmark()
|
|
Benchmark(int resolution,
boolean showOutput,
boolean showBenchmarkOutput,
boolean saveOutput)
|
|
Benchmark(int resolution,
boolean showOutput,
boolean showBenchmarkOutput,
boolean saveOutput,
int threads,
boolean showWindow)
|
Method Summary | |
---|---|
void |
execute()
|
void |
imageBegin(int w,
int h,
int bucketSize)
This is called before an image is rendered to indicate how large the rendered image will be. |
void |
imageEnd()
This call is made after the image has been rendered. |
void |
imageFill(int x,
int y,
int w,
int h,
Color c,
float alpha)
Update the current image with a region of flat color. |
void |
imagePrepare(int x,
int y,
int w,
int h,
int id)
Prepare the specified area to be rendered. |
void |
imageUpdate(int x,
int y,
int w,
int h,
Color[] data,
float[] alpha)
Update the current image with a bucket of data. |
void |
kernelBegin()
|
void |
kernelEnd()
|
void |
kernelMain()
|
static void |
main(java.lang.String[] args)
|
void |
print(UI.Module m,
UI.PrintLevel level,
java.lang.String s)
Displays some information to the user from the specified module with the specified print level. |
void |
taskStart(java.lang.String s,
int min,
int max)
Prepare a progress bar representing a lengthy task. |
void |
taskStop()
Closes the current progress bar to indicate the task is over |
void |
taskUpdate(int current)
Updates the current progress bar to a value between the current min and max. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Benchmark()
public Benchmark(int resolution, boolean showOutput, boolean showBenchmarkOutput, boolean saveOutput)
public Benchmark(int resolution, boolean showOutput, boolean showBenchmarkOutput, boolean saveOutput, int threads, boolean showWindow)
Method Detail |
---|
public static void main(java.lang.String[] args)
public void execute()
public void kernelBegin()
kernelBegin
in interface BenchmarkTest
public void kernelMain()
kernelMain
in interface BenchmarkTest
public void kernelEnd()
kernelEnd
in interface BenchmarkTest
public void print(UI.Module m, UI.PrintLevel level, java.lang.String s)
UserInterface
print
in interface UserInterface
m
- module the message came fromlevel
- seriousness of the messages
- string to displaypublic void taskStart(java.lang.String s, int min, int max)
UserInterface
taskStart
in interface UserInterface
s
- desriptive stringmin
- minimum value of the taskmax
- maximum value of the taskpublic void taskStop()
UserInterface
taskStop
in interface UserInterface
public void taskUpdate(int current)
UserInterface
taskUpdate
in interface UserInterface
current
- current value of the task in progress.public void imageBegin(int w, int h, int bucketSize)
Display
imageBegin
in interface Display
w
- width of the rendered image in pixelsh
- height of the rendered image in pixelsbucketSize
- size of the buckets in pixelspublic void imageEnd()
Display
imageEnd
in interface Display
public void imageFill(int x, int y, int w, int h, Color c, float alpha)
Display
imageFill
in interface Display
x
- x coordinate of the region within the imagey
- y coordinate of the region within the imagew
- with of the region in pixelsh
- height of the region in pixelsc
- color to fill the region withalpha
- pixel coveragepublic void imagePrepare(int x, int y, int w, int h, int id)
Display
imagePrepare
in interface Display
x
- x coordinate of the bucket within the imagey
- y coordinate of the bucket within the imagew
- width of the bucket in pixelsh
- height of the bucket in pixelsid
- unique identifier corresponding to the thread which invoked
this callpublic void imageUpdate(int x, int y, int w, int h, Color[] data, float[] alpha)
Display
w * h
long and
in row major order.
imageUpdate
in interface Display
x
- x coordinate of the bucket within the imagey
- y coordinate of the bucket within the imagew
- width of the bucket in pixelsh
- height of the bucket in pixelsdata
- bucket data, this array will be exactly w * h
longalpha
- pixel coverage data, this array will be exactly
w * h
long
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |