Fixed yg includes, should improve compilation speed

This commit is contained in:
Alex Zolotarev 2011-05-24 14:15:08 +02:00 committed by Alex Zolotarev
parent e6b9d555a4
commit 4564e25c9d
50 changed files with 106 additions and 153 deletions

View file

@ -1,5 +1,3 @@
#ifndef PACKER_H
#define PACKER_H
#pragma once
#include "rect2d.hpp"
@ -92,4 +90,3 @@ namespace m2
uint32_t invalidHandle() const;
};
}
#endif // PACKER_H

View file

@ -4,8 +4,11 @@
#include "../../qt_tstfrm/main_tester.hpp"
#include "../../qt_tstfrm/tstwidgets.hpp"
#include "../../yg/screen.hpp"
#include "../../yg/skin.hpp"
#include "../../yg/pen_info.hpp"
#include "../../geometry/screenbase.hpp"
#include "../../testing/testing.hpp"

View file

@ -7,6 +7,8 @@
#include "../yg/screen.hpp"
#include "../yg/skin.hpp"
#include "../yg/resource_manager.hpp"
#include "../yg/circle_info.hpp"
#include "../yg/pen_info.hpp"
#include "../geometry/screenbase.hpp"
@ -14,10 +16,6 @@
#include "../base/logging.hpp"
#include "../base/buffer_vector.hpp"
#include "../std/sstream.hpp"
#include "../base/start_mem_debug.hpp"
DrawerYG::Params::Params()
: m_dynamicPagesCount(2),
m_textPagesCount(2)

View file

@ -1,19 +1,20 @@
#include "../base/SRC_FIRST.hpp"
#include "information_display.hpp"
#include "drawer_yg.hpp"
#include "../indexer/mercator.hpp"
#include "../yg/defines.hpp"
#include "../yg/skin.hpp"
#include "../yg/pen_info.hpp"
#include "../std/fstream.hpp"
#include "../std/iomanip.hpp"
#include "../version/version.hpp"
#include "../base/string_utils.hpp"
#include "../base/logging.hpp"
#include "../base/mutex.hpp"
#include "../base/macros.hpp"
#include "../std/fstream.hpp"
#include "../std/iomanip.hpp"
InformationDisplay::InformationDisplay()
{

View file

@ -1,4 +1,3 @@
#include "../base/SRC_FIRST.hpp"
#include "../base/mutex.hpp"
#include "../base/timer.hpp"
#include "../base/logging.hpp"
@ -10,11 +9,11 @@
#include "../yg/rendercontext.hpp"
#include "../yg/framebuffer.hpp"
#include "../yg/renderbuffer.hpp"
#include "../yg/texture.hpp"
#include "../yg/resource_manager.hpp"
#include "../yg/screen.hpp"
#include "../yg/pen_info.hpp"
#include "../yg/skin.hpp"
#include "../yg/base_texture.hpp"
#include "../indexer/scales.hpp"
@ -22,6 +21,7 @@
#include "drawer_yg.hpp"
#include "window_handle.hpp"
#include "render_queue_routine.hpp"
RenderQueueRoutine::RenderModelCommand::RenderModelCommand(ScreenBase const & frameScreen,
render_fn_t renderFn)
: m_frameScreen(frameScreen),

View file

@ -7,14 +7,12 @@
#include "../platform/platform.hpp"
#include "../yg/rendercontext.hpp"
#include "../yg/internal/opengl.hpp"
#ifdef OMIM_OS_WINDOWS
#include "../yg/internal/opengl_win32.hpp"
#include "../yg/internal/opengl_win32.hpp"
#endif
#include "../base/start_mem_debug.hpp"
namespace qt
{
template class GLDrawWidgetT<DrawerYG>;

View file

@ -2,8 +2,6 @@
#include "../qt_tstfrm/widgets.hpp"
#include "../map/qgl_render_context.hpp"
#include "../yg/texture.hpp"
#include "../base/start_mem_debug.hpp"
#include "../yg/resource_manager.hpp"
class DrawerYG;
@ -43,5 +41,3 @@ namespace qt
virtual void initializeGL();
};
}
#include "../base/stop_mem_debug.hpp"

View file

@ -1,14 +1,11 @@
#pragma once
#include <QtGui/QWidget>
#include <QtOpenGL/qgl.h>
#include "../base/start_mem_debug.hpp"
#include "../std/shared_ptr.hpp"
#include "../yg/screen.hpp"
#include "../map/drawer_yg.hpp"
#include "../std/shared_ptr.hpp"
namespace qt
{
template <class TScreen, class TBase> class BaseDrawWidget : public TBase
@ -54,5 +51,3 @@ namespace qt
//@}
};
}
#include "../base/stop_mem_debug.hpp"

View file

@ -2,8 +2,6 @@
#include "widgets.hpp"
#include "../base/start_mem_debug.hpp"
namespace qt
{
template <class T>

View file

@ -1,6 +1,9 @@
#include "area_renderer.hpp"
#include "resource_style.hpp"
#include "skin.hpp"
#include "skin_page.hpp"
#include "base_texture.hpp"
#include "../base/logging.hpp"
namespace yg

View file

@ -3,13 +3,13 @@
#include "blitter.hpp"
#include "framebuffer.hpp"
#include "base_texture.hpp"
#include "texture.hpp"
#include "resource_manager.hpp"
#include "vertexbuffer.hpp"
#include "indexbuffer.hpp"
#include "utils.hpp"
#include "storage.hpp"
#include "vertex.hpp"
#include "texture.hpp"
#include "../geometry/screenbase.hpp"

View file

@ -1,6 +1,5 @@
#pragma once
#include "color.hpp"
#include "clipper.hpp"
#include "storage.hpp"
#include "../std/shared_ptr.hpp"
@ -11,6 +10,8 @@ class ScreenBase;
namespace yg
{
struct Color;
namespace gl
{
class BaseTexture;

View file

@ -1,6 +1,6 @@
#pragma once
#include "../base/base.hpp"
#include "../std/stdint.hpp"
namespace yg
{
@ -27,8 +27,8 @@ namespace yg
bool operator !=(Color const & l, Color const & r);
bool operator ==(Color const & l, Color const & r);
inline int redFromARGB(uint32_t c) {return (c >> 16) & 0xFF;};
inline int greenFromARGB(uint32_t c) {return (c >> 8) & 0xFF;};
inline int blueFromARGB(uint32_t c) {return (c & 0xFF);};
inline int alphaFromARGB(uint32_t c) {return (c >> 24) & 0xFF;};
inline int redFromARGB(uint32_t c) {return (c >> 16) & 0xFF;}
inline int greenFromARGB(uint32_t c) {return (c >> 8) & 0xFF; }
inline int blueFromARGB(uint32_t c) {return (c & 0xFF); }
inline int alphaFromARGB(uint32_t c) {return (c >> 24) & 0xFF;}
}

View file

@ -1,11 +1,11 @@
#include "../base/SRC_FIRST.hpp"
#include "geometry_batcher.hpp"
#include "skin.hpp"
#include "memento.hpp"
#include "color.hpp"
#include "utils.hpp"
#include "resource_manager.hpp"
#include "skin_page.hpp"
#include "base_texture.hpp"
#include "internal/opengl.hpp"
@ -20,8 +20,6 @@
#include "../std/algorithm.hpp"
#include "../std/bind.hpp"
#include "../base/start_mem_debug.hpp"
namespace yg
{
namespace gl

View file

@ -1,7 +1,6 @@
#pragma once
#include "vertex.hpp"
#include "texture.hpp"
#include "vertexbuffer.hpp"
#include "indexbuffer.hpp"
#include "renderbuffer.hpp"
@ -15,7 +14,6 @@
#include "../std/function.hpp"
#include "../base/matrix.hpp"
#include "../base/start_mem_debug.hpp"
namespace threads
{
@ -173,5 +171,3 @@ namespace yg
};
}
}
#include "../base/stop_mem_debug.hpp"

View file

@ -292,8 +292,9 @@ namespace yg
break;
}
if (i == 100)
{
LOG(LINFO, ("100 iteration on computing kerning exceeded. possibly infinite loop occured"));
}
/// kerning should be computed for baseline centered glyph
prevElem = m_entries[symPos];

View file

@ -1,6 +1,6 @@
#pragma once
#include <internal/opengl.hpp>
#include "internal/opengl.hpp"
namespace yg
{

View file

@ -2,13 +2,16 @@
#include "renderer.hpp"
#include "../geometry/point2d.hpp"
#include "../std/vector.hpp"
#include "base_texture.hpp"
namespace yg
{
namespace gl
{
class BaseTexture;
/// all the layers are combined by a simple blitting
/// at the endFrame/updateActualTarget.
class LayerManager : public Renderer

View file

@ -1,5 +1,4 @@
#ifndef MEMENTO_H
#define MEMENTO_H
#pragma once
namespace yg
{
@ -41,5 +40,3 @@ namespace yg
}
}
#endif // MEMENTO_H

View file

@ -1,8 +1,8 @@
#include "../base/SRC_FIRST.hpp"
#include "path_renderer.hpp"
#include "resource_style.hpp"
#include "skin.hpp"
#include "skin_page.hpp"
#include "base_texture.hpp"
#include "../base/logging.hpp"

View file

@ -1,12 +0,0 @@
#pragma once
namespace yg
{
namespace gl
{
class PBufferTexture
{
};
}
}

View file

@ -3,7 +3,7 @@
#include "color.hpp"
#include "../geometry/point2d.hpp"
#include "../std/vector.hpp"
#include "../base/buffer_vector.hpp"
namespace yg

View file

@ -1,16 +1,18 @@
#pragma once
#include "../geometry/screenbase.hpp"
#include "../base/mutex.hpp"
#include "../std/function.hpp"
#include "../std/list.hpp"
#include "../std/shared_ptr.hpp"
#include "../geometry/screenbase.hpp"
#include "texture.hpp"
namespace yg
{
namespace gl
{
class BaseTexture;
class RenderBuffer;
class RenderState

View file

@ -1,8 +1,8 @@
#include "../base/SRC_FIRST.hpp"
#include "render_state_updater.hpp"
#include "render_state.hpp"
#include "framebuffer.hpp"
#include "internal/opengl.hpp"
#include "base_texture.hpp"
#include "../base/logging.hpp"

View file

@ -1,7 +1,6 @@
#pragma once
#include "../std/shared_ptr.hpp"
#include "../geometry/screenbase.hpp"
#include "../base/timer.hpp"
#include "geometry_renderer.hpp"

View file

@ -7,7 +7,7 @@ namespace yg
class RenderTarget
{
public:
virtual ~RenderTarget(){};
virtual ~RenderTarget() {}
/// attach render target to framebuffer and setup coordinate system
virtual void attachToFrameBuffer() = 0;
virtual unsigned width() const = 0;

View file

@ -1,9 +1,9 @@
#pragma once
#include "../std/shared_ptr.hpp"
#include "texture.hpp"
#include "color.hpp"
#include "../std/shared_ptr.hpp"
namespace yg
{
class ResourceManager;
@ -12,6 +12,8 @@ namespace yg
{
class FrameBuffer;
class RenderBuffer;
class BaseTexture;
class RenderTarget;
class Renderer
{

View file

@ -1,22 +1,24 @@
#include "../base/SRC_FIRST.hpp"
#include "internal/opengl.hpp"
#include "base_texture.hpp"
#include "data_formats.hpp"
#include "resource_manager.hpp"
#include "skin_loader.hpp"
#include "texture.hpp"
#include "storage.hpp"
#include "texture.hpp"
#include "../coding/file_reader.hpp"
#include "../coding/parse_xml.hpp"
#include "../base/logging.hpp"
#include "../base/logging.hpp"
#include "../base/exception.hpp"
namespace yg
{
typedef gl::Texture<DATA_TRAITS, true> TDynamicTexture;
typedef gl::Texture<DATA_TRAITS, false> TStaticTexture;
DECLARE_EXCEPTION(ResourceManagerException, RootException);
ResourceManager::ResourceManager(size_t vbSize, size_t ibSize, size_t storagesCount,
size_t smallVBSize, size_t smallIBSize, size_t smallStoragesCount,
size_t blitVBSize, size_t blitIBSize, size_t blitStoragesCount,
@ -260,7 +262,7 @@ namespace yg
case Rt4Bpp:
return make_shared_ptr(new gl::Texture<RGBA4Traits, false>(w, h));
default:
throw std::runtime_error("unknows render target format");
MYTHROW(ResourceManagerException, ("unknown render target format"));
};
}

View file

@ -1,11 +1,8 @@
#ifndef RESOURCE_STYLE_HPP
#define RESOURCE_STYLE_HPP
#pragma once
#include "../geometry/rect2d.hpp"
#include "pen_info.hpp"
#include "../base/start_mem_debug.hpp"
namespace yg
{
struct ResourceStyle
@ -68,7 +65,3 @@ namespace yg
GenericStyle(m2::RectU const & texRect, int pageID);
};
}
#include "../base/start_mem_debug.hpp"
#endif // RESOURCE_STYLE_HPP

View file

@ -1,7 +1,6 @@
#pragma once
#include "shape_renderer.hpp"
#include "../std/shared_ptr.hpp"
namespace yg
{

View file

@ -1,6 +1,11 @@
#include "../base/SRC_FIRST.hpp"
#include "shape_renderer.hpp"
#include "skin.hpp"
#include "pen_info.hpp"
#include "resource_style.hpp"
#include "skin_page.hpp"
#include "base_texture.hpp"
#include "../geometry/point2d.hpp"
#include "../base/logging.hpp"

View file

@ -1,5 +1,4 @@
#include "skin.hpp"
#include "texture.hpp"
#include "skin_page.hpp"
#include "resource_style.hpp"
#include "resource_manager.hpp"

View file

@ -1,18 +1,11 @@
#pragma once
#include "resource_style.hpp"
#include "pen_info.hpp"
#include "circle_info.hpp"
#include "skin_page.hpp"
#include "../geometry/rect2d.hpp"
#include "../std/unordered_map.hpp"
#include "../std/shared_ptr.hpp"
#include "../std/function.hpp"
#include "../std/map.hpp"
#include "../std/vector.hpp"
#include "../std/string.hpp"
#include "../std/utility.hpp"
#include "../geometry/packer.hpp"
#include "../std/queue.hpp"
namespace yg
{
@ -34,6 +27,12 @@ namespace yg
class SkinPage;
class ResourceManager;
struct ResourceStyle;
struct PenInfo;
struct CircleInfo;
struct Color;
struct GlyphKey;
struct FontInfo;
class Skin
{

View file

@ -1,10 +1,10 @@
#include "skin.hpp"
#include "skin_loader.hpp"
#include "resource_manager.hpp"
#include "resource_style.hpp"
#include "skin_page.hpp"
#include "../base/string_utils.hpp"
#include "../base/start_mem_debug.hpp"
namespace yg
{

View file

@ -1,16 +1,16 @@
/// @author Siarhei Rachytski
#pragma once
#include "resource_style.hpp"
#include "skin.hpp"
#include "../geometry/rect2d.hpp"
#include "../base/base.hpp"
#include "../std/string.hpp"
#include "../std/list.hpp"
#include "../std/map.hpp"
#include "../std/vector.hpp"
//#include "resource_style.hpp"
//#include "skin.hpp"
//#include "../geometry/rect2d.hpp"
//#include "../base/base.hpp"
//#include "../std/string.hpp"
//#include "../std/list.hpp"
//#include "../std/map.hpp"
//#include "../std/vector.hpp"
#include "../std/shared_ptr.hpp"
#include "../std/utility.hpp"
//#include "../std/utility.hpp"
/// @example
/// <?xml version="1.0" ?>
@ -37,6 +37,9 @@ namespace yg
}
class ResourceManager;
class SkinPage;
struct ResourceStyle;
struct CharStyle;
class SkinLoader
{

View file

@ -1,19 +1,13 @@
#include "../base/SRC_FIRST.hpp"
#include <agg_basics.h>
#include <agg_pixfmt_gray.h>
#include <agg_pixfmt_rgba.h>
#include <agg_pixfmt_rgb_packed.h>
#include <agg_renderer_scanline.h>
#include <agg_rasterizer_scanline_aa.h>
#include <agg_path_storage.h>
#include <agg_scanline_u.h>
#include <agg_ellipse.h>
#include <boost/gil/gil_all.hpp>
#include "texture.hpp"
#include "data_formats.hpp"
#include "skin_page.hpp"
#include "texture.hpp"
#include "resource_style.hpp"
#include "resource_manager.hpp"
#include "internal/opengl.hpp"

View file

@ -1,9 +1,6 @@
#pragma once
#include "../std/shared_ptr.hpp"
#include "../std/unordered_map.hpp"
#include "../std/map.hpp"
#include "../std/vector.hpp"
#include "../geometry/packer.hpp"
#include "../geometry/rect2d.hpp"
@ -23,6 +20,7 @@ namespace yg
struct CharStyle;
struct ResourceStyle;
class ResourceManager;
struct GlyphInfo;
struct GlyphUploadCmd
{

View file

@ -1,10 +1,11 @@
#include "../base/SRC_FIRST.hpp"
#include "symbol_renderer.hpp"
#include "skin.hpp"
#include "defines.hpp"
#include "resource_style.hpp"
#include "../base/logging.hpp"
#include "../std/bind.hpp"
#include "../base/logging.hpp"
namespace yg
{

View file

@ -1,7 +1,9 @@
#pragma once
#include "text_renderer.hpp"
#include "../geometry/tree4d.hpp"
#include "../std/map.hpp"
namespace yg

View file

@ -1,12 +1,10 @@
#include "../base/SRC_FIRST.hpp"
#include "defines.hpp"
#include "text_renderer.hpp"
#include "resource_manager.hpp"
#include "texture.hpp"
#include "skin.hpp"
#include "render_state.hpp"
#include "glyph_layout.hpp"
#include "resource_style.hpp"
#include "../geometry/angles.hpp"

View file

@ -1,17 +1,12 @@
#pragma once
#include "internal/opengl.hpp"
#include "color.hpp"
#include "managed_texture.hpp"
#include "data_formats.hpp"
#include "../geometry/point2d.hpp"
#include "../geometry/rect2d.hpp"
#include "../std/vector.hpp"
#include "../3party/boost/boost/gil/gil_all.hpp"
#include "../3party/boost/boost/mpl/vector_c.hpp"
#include "../platform/platform.hpp"
#include "../coding/lodepng_io.hpp"
#include "../std/iostream.hpp"
namespace gil = boost::gil;
namespace mpl = boost::mpl;

View file

@ -3,7 +3,6 @@
#include "framebuffer.hpp"
#include "blitter.hpp"
#include "rendercontext.hpp"
#include "texture.hpp"
#include "renderbuffer.hpp"
#include "render_state.hpp"
#include "vertexbuffer.hpp"

View file

@ -1,15 +1,10 @@
#pragma once
#include "rendercontext.hpp"
#include "render_state.hpp"
#include "render_command.hpp"
#include "../geometry/rect2d.hpp"
#include "../std/shared_ptr.hpp"
#include "../std/unordered_map.hpp"
#include "../std/list.hpp"
#include "../base/thread.hpp"
#include "../base/mutex.hpp"
#include "../base/condition.hpp"
class ScreenBase;
@ -22,6 +17,9 @@ namespace yg
class FrameBuffer;
class RenderBuffer;
class RenderState;
class Blitter;
class IndexBuffer;
class VertexBuffer;
class ThreadRenderer
{

View file

@ -1,6 +1,7 @@
#pragma once
#include "color.hpp"
#include "../geometry/point2d.hpp"
namespace yg

View file

@ -1,3 +0,0 @@
#include "yg.hpp"
#include "../base/start_mem_debug.hpp"

View file

@ -1,6 +0,0 @@
#pragma once
#include "../base/start_mem_debug.hpp"
#include "../base/stop_mem_debug.hpp"

View file

@ -18,7 +18,6 @@ include($$ROOT_DIR/common.pri)
SOURCES += \
internal/opengl.cpp \
yg.cpp \
vertex.cpp \
resource_manager.cpp \
skin.cpp \
@ -62,7 +61,6 @@ SOURCES += \
HEADERS += \
internal/opengl.hpp \
yg.hpp \
vertex.hpp \
resource_manager.hpp \
texture.hpp \
@ -79,7 +77,6 @@ HEADERS += \
renderbuffer.hpp \
base_texture.hpp \
managed_texture.hpp \
pbuffer_texture.hpp \
fence.hpp \
thread_renderer.hpp \
rendercontext.hpp \

View file

@ -6,6 +6,7 @@
#include "../../yg/internal/opengl.hpp"
#include "../../yg/skin.hpp"
#include "../../yg/pen_info.hpp"
#include "../../yg/circle_info.hpp"
#include "../../qt_tstfrm/macros.hpp"

View file

@ -1,6 +1,7 @@
#include "../../base/SRC_FIRST.hpp"
#include "../../yg/screen.hpp"
#include "../../yg/skin.hpp"
#include "../../yg/pen_info.hpp"
#include "../../geometry/screenbase.hpp"
#include "../../geometry/point2d.hpp"
#include "../../std/vector.hpp"

View file

@ -2,6 +2,7 @@
#include "../../qt_tstfrm/macros.hpp"
#include "../skin.hpp"
#include "../resource_manager.hpp"
#include "../pen_info.hpp"
#include "../../std/vector.hpp"
#include "../../platform/platform.hpp"