Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-09 11:54:21 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-09 11:54:21 +0400
commit30155e958b8faf30a4c1ae6f437cc6e2a86c9112 (patch)
tree111706f89fb75f3583dc8ec5e271c57be6761cc3 /source/blender
parentf8f4f73cc5e6dfdc2a4f8864a3e1edc2639e6fb2 (diff)
Code cleanup: remove unused image window code, already implemented elsewhere.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_image/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_image/image_render.c179
2 files changed, 0 insertions, 180 deletions
diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt
index b23ab624faa..8e73b1b7d96 100644
--- a/source/blender/editors/space_image/CMakeLists.txt
+++ b/source/blender/editors/space_image/CMakeLists.txt
@@ -38,7 +38,6 @@ set(SRC
image_buttons.c
image_draw.c
image_ops.c
- image_render.c
space_image.c
image_intern.h
diff --git a/source/blender/editors/space_image/image_render.c b/source/blender/editors/space_image/image_render.c
deleted file mode 100644
index 04b65af618e..00000000000
--- a/source/blender/editors/space_image/image_render.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * Contributor(s): Blender Foundation, 2002-2009
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/editors/space_image/image_render.c
- * \ingroup spimage
- */
-
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "BLI_utildefines.h"
-
-#include "DNA_screen_types.h"
-#include "DNA_space_types.h"
-
-#include "BKE_context.h"
-#include "BKE_image.h"
-
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
-
-#include "RE_pipeline.h"
-
-
-#define HEADER_HEIGHT 18
-
-/* *********************** render callbacks ***************** */
-
-/* set on initialize render, only one render output to imagewindow can exist, so the global isnt dangerous yet :) */
-static ScrArea *image_area= NULL;
-
-/* can get as well the full picture, as the parts while rendering */
-/* XXX will be obsolete, here for reference now */
-static void imagewindow_progress(SpaceImage *sima, RenderResult *rr, volatile rcti *renrect)
-{
- float x1, y1, *rectf= NULL;
- unsigned int *rect32= NULL;
- int ymin, ymax, xmin, xmax;
-
- /* if renrect argument, we only display scanlines */
- if(renrect) {
- /* if ymax==recty, rendering of layer is ready, we should not draw, other things happen... */
- if(rr->renlay==NULL || renrect->ymax>=rr->recty)
- return;
-
- /* xmin here is first subrect x coord, xmax defines subrect width */
- xmin = renrect->xmin;
- xmax = renrect->xmax - xmin;
- if (xmax<2) return;
-
- ymin= renrect->ymin;
- ymax= renrect->ymax - ymin;
- if(ymax<2)
- return;
- renrect->ymin= renrect->ymax;
- }
- else {
- xmin = ymin = 0;
- xmax = rr->rectx - 2*rr->crop;
- ymax = rr->recty - 2*rr->crop;
- }
-
- /* image window cruft */
-
- /* find current float rect for display, first case is after composit... still weak */
- if(rr->rectf)
- rectf= rr->rectf;
- else {
- if(rr->rect32)
- rect32= (unsigned int *)rr->rect32;
- else {
- if(rr->renlay==NULL || rr->renlay->rectf==NULL) return;
- rectf= rr->renlay->rectf;
- }
- }
- if(rectf) {
- /* if scanline updates... */
- rectf+= 4*(rr->rectx*ymin + xmin);
-
- /* when rendering more pixels than needed, we crop away cruft */
- if(rr->crop)
- rectf+= 4*(rr->crop*rr->rectx + rr->crop);
- }
-
- /* tilerect defines drawing offset from (0,0) */
- /* however, tilerect (xmin, ymin) is first pixel */
- x1 = sima->centx + (rr->tilerect.xmin + rr->crop + xmin)*sima->zoom;
- y1 = sima->centy + (rr->tilerect.ymin + rr->crop + ymin)*sima->zoom;
-
- /* needed for gla draw */
- // XXX { rcti rct= ar->winrct; rct.ymax-= HEADER_HEIGHT; glaDefine2DArea(&rct);}
-
- glPixelZoom(sima->zoom, sima->zoom);
-
- if(rect32)
- glaDrawPixelsSafe(x1, y1, xmax, ymax, rr->rectx, GL_RGBA, GL_UNSIGNED_BYTE, rect32);
- else
- glaDrawPixelsSafe_to32(x1, y1, xmax, ymax, rr->rectx, rectf, 0);
-
- glPixelZoom(1.0, 1.0);
-
-}
-
-
-/* coming from BIF_toggle_render_display() */
-static void imagewindow_toggle_render(bContext *C)
-{
- bScreen *sc= CTX_wm_screen(C);
- ScrArea *sa;
-
- /* check if any imagewindow is showing temporal render output */
- for(sa=sc->areabase.first; sa; sa= sa->next) {
- if(sa->spacetype==SPACE_IMAGE) {
- SpaceImage *sima= sa->spacedata.first;
-
- if(sima->image && sima->image->type==IMA_TYPE_R_RESULT)
- if(sima->flag & (SI_PREVSPACE|SI_FULLWINDOW))
- break;
- }
- }
-
- if(sa) {
- // XXX addqueue(sa->win, ESCKEY, 1); /* also returns from fullscreen */
- }
- else {
-// sa= imagewindow_set_render_display(C);
- // XXX scrarea_queue_headredraw(sa);
- // XXX scrarea_queue_winredraw(sa);
- }
-}
-
-/* NOTE: called while render, so no malloc allowed! */
-static void imagewindow_renderinfo_cb(void *UNUSED(handle), RenderStats *UNUSED(rs))
-{
- if(image_area) {
- // XXX BIF_make_render_text(rs);
-
- // XXX sima_draw_render_info(sima, ar);
-
- /* no screen_swapbuffers, prevent any other window to draw */
- // XXX myswapbuffers();
- }
-}
-
-static void ED_space_image_render_callbacks(bContext *C, Render *re)
-{
-
-// RE_display_init_cb(re, C, imagewindow_init_display_cb);
-// RE_display_draw_cb(re, C, imagewindow_progress_display_cb);
-// RE_display_clear_cb(re, C, imagewindow_clear_display_cb);
- RE_stats_draw_cb(re, C, imagewindow_renderinfo_cb);
-}
-