Mercurial > hg > Game > Cerium
changeset 839:1001c4bea1a0 draft
if unnecessary
author | Yutaka_Kinjyo |
---|---|
date | Fri, 28 May 2010 03:24:52 +0900 |
parents | 92bf8fc6a2a9 |
children | ee23700a135b |
files | Renderer/Engine/viewer.cc |
diffstat | 1 files changed, 28 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc Fri May 28 01:47:42 2010 +0900 +++ b/Renderer/Engine/viewer.cc Fri May 28 03:24:52 2010 +0900 @@ -569,64 +569,41 @@ int rangey = (starty + split_screen_h - 1 > this->height) ? this->height - starty + 1 : split_screen_h; -#if 0 +#if 1 int array_task_num = (this->width + split_screen_w - 1) / split_screen_w; HTaskPtr task_draw_array = manager->create_task_array(DrawSpan, array_task_num, 6, 1, rangey); Task *task_draw = 0; while (startx < this->width) { + + // Draw SpanPack + + task_draw = task_draw_array->next_task_array(DrawSpan,task_draw); + task_draw->set_param(0,(memaddr)&pixels[(startx-1) + this->width*(starty-1)]); + task_draw->set_param(1,this->width); + task_draw->set_param(2,startx); + task_draw->set_param(3,endx); + task_draw->set_param(4,rangey); + task_draw->set_param(5,spack->info.size); - if (spack->info.size > 0) { - // Draw SpanPack - - task_draw = task_draw_array->next_task_array(DrawSpan,task_draw); - task_draw->set_param(0,(memaddr)&pixels[(startx-1) + this->width*(starty-1)]); - task_draw->set_param(1,this->width); - task_draw->set_param(2,startx); - task_draw->set_param(3,endx); - task_draw->set_param(4,rangey); - task_draw->set_param(5,spack->info.size); - - task_draw->set_inData(0,spack, sizeof(SpanPack)); - - for (int i = 0; i < rangey; i++) { - task_draw->set_outData(i, - &pixels[(startx-1) + this->width*(starty-1 + i) ], - (endx-startx+1)*sizeof(int)); - } - - } else { - - task_draw = task_draw_array->next_task_array(DrawSpan,task_draw); - task_draw->set_param(0,(memaddr)&pixels[(startx-1) + this->width*(starty-1)]); - task_draw->set_param(1,this->width); - task_draw->set_param(2,startx); - task_draw->set_param(3,endx); - task_draw->set_param(4,rangey); - task_draw->set_param(5,spack->info.size); - - task_draw->set_inData(0,spack, sizeof(SpanPack)); - - for (int i = 0; i < rangey; i++) { - task_draw->set_outData(i, - &pixels[(startx-1) + this->width*(starty-1 + i) ], - (endx-startx+1)*sizeof(int)); - - } - - - } - - startx += split_screen_w; - endx += split_screen_w; - - if (endx > this->width) { - endx = this->width; - } - - } - + task_draw->set_inData(0,spack, sizeof(SpanPack)); + + for (int i = 0; i < rangey; i++) { + task_draw->set_outData(i, + &pixels[(startx-1) + this->width*(starty-1 + i) ], + (endx-startx+1)*sizeof(int)); + } + + startx += split_screen_w; + endx += split_screen_w; + + if (endx > this->width) { + endx = this->width; + } + + } + task_draw_array->spawn_task_array(task_draw->next()); task_draw_array->set_cpu(SPE_ANY); task_next->wait_for(task_draw_array);