git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
David's final changes: more profiler features, fixes.
[ipdf/code.git]
/
src
/
view.h
diff --git
a/src/view.h
b/src/view.h
index
47eb0fb
..
e1b3291
100644
(file)
--- a/
src/view.h
+++ b/
src/view.h
@@
-8,21
+8,16
@@
#include "path.h"
#include "transformationtype.h"
#include "path.h"
#include "transformationtype.h"
-#define USE_GPU_TRANSFORM
tru
e
+#define USE_GPU_TRANSFORM
fals
e
#define USE_GPU_RENDERING true
#define USE_SHADING !(USE_GPU_RENDERING) && true
#define USE_GPU_RENDERING true
#define USE_SHADING !(USE_GPU_RENDERING) && true
-#ifdef TRANSFORM_BEZIERS_TO_PATH
+
#include "gmprat.h"
#include "gmprat.h"
-#endif
+
namespace IPDF
{
namespace IPDF
{
- #ifdef TRANSFORM_BEZIERS_TO_PATH
- typedef Gmprat VReal;
- #else
- typedef Real VReal;
- #endif
typedef TRect<VReal> VRect;
class Screen;
typedef TRect<VReal> VRect;
class Screen;
@@
-39,8
+34,8
@@
namespace IPDF
void Render(int width = 0, int height = 0);
void Render(int width = 0, int height = 0);
- void Translate(
VReal x, V
Real y);
- void ScaleAroundPoint(
VReal x, VReal y, V
Real scale_amount);
+ void Translate(
Real x,
Real y);
+ void ScaleAroundPoint(
Real x, Real y,
Real scale_amount);
void SetBounds(const Rect & new_bounds);
Rect TransformToViewCoords(const Rect& inp) const;
void SetBounds(const Rect & new_bounds);
Rect TransformToViewCoords(const Rect& inp) const;
@@
-72,6
+67,8
@@
namespace IPDF
void ForceBufferDirty() {m_buffer_dirty = true;}
void ForceRenderDirty() {m_render_dirty = true;}
void ForceBufferDirty() {m_buffer_dirty = true;}
void ForceRenderDirty() {m_render_dirty = true;}
+ void QueryGPUBounds(const char * filename, const char * mode="r");
+
void SetLazyRendering(bool state = true) {m_lazy_rendering = state;}
bool UsingLazyRendering() const {return m_lazy_rendering;}
void SetLazyRendering(bool state = true) {m_lazy_rendering = state;}
bool UsingLazyRendering() const {return m_lazy_rendering;}
@@
-81,6
+78,9
@@
namespace IPDF
void SaveGPUBMP(const char * filename);
Document & Doc() {return m_document;}
void SaveGPUBMP(const char * filename);
Document & Doc() {return m_document;}
+#ifndef QUADTREE_DISABLED
+ QuadTreeIndex GetCurrentQuadtreeNode() { return m_current_quadtree_node; }
+#endif
private:
struct GPUObjBounds
private:
struct GPUObjBounds
@@
-88,6
+88,8
@@
namespace IPDF
float x0, y0;
float x1, y1;
} __attribute__((packed));
float x0, y0;
float x1, y1;
} __attribute__((packed));
+
+
void PrepareRender(); // call when m_render_dirty is true
void UpdateObjBoundsVBO(unsigned first_obj, unsigned last_obj); // call when m_buffer_dirty is true
void PrepareRender(); // call when m_render_dirty is true
void UpdateObjBoundsVBO(unsigned first_obj, unsigned last_obj); // call when m_buffer_dirty is true
@@
-126,6
+128,8
@@
namespace IPDF
bool m_show_fill_bounds;
bool m_lazy_rendering;// don't redraw frames unless we need to
bool m_show_fill_bounds;
bool m_lazy_rendering;// don't redraw frames unless we need to
+
+ FILE * m_query_gpu_bounds_on_next_frame;
#ifndef QUADTREE_DISABLED
#ifndef QUADTREE_DISABLED
UCC
git Repository :: git.ucc.asn.au