public class Benchmark extends java.lang.Object implements BenchmarkTest, UserInterface, Display
| Constructor and Description |
|---|
Benchmark() |
Benchmark(int resolution,
boolean showOutput,
boolean showBenchmarkOutput,
boolean saveOutput) |
Benchmark(int resolution,
boolean showOutput,
boolean showBenchmarkOutput,
boolean saveOutput,
int threads,
boolean showWindow) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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)
public static void main(java.lang.String[] args)
public void execute()
public void kernelBegin()
kernelBegin in interface BenchmarkTestpublic void kernelMain()
kernelMain in interface BenchmarkTestpublic void kernelEnd()
kernelEnd in interface BenchmarkTestpublic void print(UI.Module m, UI.PrintLevel level, java.lang.String s)
UserInterfaceprint in interface UserInterfacem - module the message came fromlevel - seriousness of the messages - string to displaypublic void taskStart(java.lang.String s,
int min,
int max)
UserInterfacetaskStart in interface UserInterfaces - desriptive stringmin - minimum value of the taskmax - maximum value of the taskpublic void taskStop()
UserInterfacetaskStop in interface UserInterfacepublic void taskUpdate(int current)
UserInterfacetaskUpdate in interface UserInterfacecurrent - current value of the task in progress.public void imageBegin(int w,
int h,
int bucketSize)
DisplayimageBegin in interface Displayw - width of the rendered image in pixelsh - height of the rendered image in pixelsbucketSize - size of the buckets in pixelspublic void imageEnd()
Displaypublic void imageFill(int x,
int y,
int w,
int h,
Color c,
float alpha)
Displaypublic void imagePrepare(int x,
int y,
int w,
int h,
int id)
DisplayimagePrepare in interface Displayx - 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)
Displayw * h long and
in row major order.imageUpdate in interface Displayx - 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