~ubuntu-branches/ubuntu/saucy/blender/saucy-proposed

« back to all changes in this revision

Viewing changes to intern/cycles/device/device_task.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2011, Blender Foundation.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU General Public License
 
6
 * as published by the Free Software Foundation; either version 2
 
7
 * of the License, or (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software Foundation,
 
16
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
17
 */
 
18
 
 
19
#ifndef __DEVICE_TASK_H__
 
20
#define __DEVICE_TASK_H__
 
21
 
 
22
#include "device_memory.h"
 
23
 
 
24
#include "util_function.h"
 
25
#include "util_list.h"
 
26
#include "util_task.h"
 
27
 
 
28
CCL_NAMESPACE_BEGIN
 
29
 
 
30
/* Device Task */
 
31
 
 
32
class Device;
 
33
class RenderBuffers;
 
34
class RenderTile;
 
35
class Tile;
 
36
 
 
37
class DeviceTask : public Task {
 
38
public:
 
39
        typedef enum { PATH_TRACE, TONEMAP, SHADER } Type;
 
40
        Type type;
 
41
 
 
42
        int x, y, w, h;
 
43
        device_ptr rgba;
 
44
        device_ptr buffer;
 
45
        int sample;
 
46
        int num_samples;
 
47
        int resolution;
 
48
        int offset, stride;
 
49
 
 
50
        device_ptr shader_input;
 
51
        device_ptr shader_output;
 
52
        int shader_eval_type;
 
53
        int shader_x, shader_w;
 
54
 
 
55
        DeviceTask(Type type = PATH_TRACE);
 
56
 
 
57
        void split(list<DeviceTask>& tasks, int num);
 
58
        void split_max_size(list<DeviceTask>& tasks, int max_size);
 
59
 
 
60
        void update_progress(RenderTile &rtile);
 
61
 
 
62
        boost::function<bool(Device *device, RenderTile&)> acquire_tile;
 
63
        boost::function<void(void)> update_progress_sample;
 
64
        boost::function<void(RenderTile&)> update_tile_sample;
 
65
        boost::function<void(RenderTile&)> release_tile;
 
66
        boost::function<bool(void)> get_cancel;
 
67
 
 
68
        bool need_finish_queue;
 
69
protected:
 
70
        double last_update_time;
 
71
};
 
72
 
 
73
CCL_NAMESPACE_END
 
74
 
 
75
#endif /* __DEVICE_TASK_H__ */
 
76