X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Fcommon%2Frender-item.h;h=96a6130eb81ec3914e89d9771c30b87c1c21f4c9;hb=b43741a90b40ca9dfbd33d6a9d390d3c09230e89;hp=156272c4f1e6cefe6a71ee04dbf68b33f2bcb770;hpb=e68a638bd0697215334042c53c47fc98ce979fa3;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/common/render-item.h b/dali/internal/render/common/render-item.h old mode 100644 new mode 100755 index 156272c..96a6130 --- a/dali/internal/render/common/render-item.h +++ b/dali/internal/render/common/render-item.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,6 @@ namespace Internal namespace Render { class Renderer; -class RenderGeometry; } namespace SceneGraph @@ -56,6 +55,22 @@ struct RenderItem ~RenderItem(); /** + * @brief This method is an optimized calculation of a viewport-space AABB (Axis-Aligned-Bounding-Box). + * + * We use the model-view-matrix, but we do not use projection. Therefore we assume Z = 0. + * As the box is Axis-Aligned (in viewport space) rotations on Z axis are correctly delt with by expanding the box as necessary. + * Rotations on X & Y axis will resize the AABB, but it will not handle the projection error due to the new coordinates having non-zero Z values. + * + * Note: We pass in the viewport dimensions rather than allow the caller to modify the raw AABB in order to optimally generate the final result. + * + * @param[in] viewportWidth The width of the viewport to calculate for + * @param[in] viewportHeight The height of the viewport to calculate for + * @param[in] useUpdateSizeHint Set to true if you want to use update size hint instead of item size + * @return The AABB coordinates in viewport-space (x, y, width, height) + */ + ClippingBox CalculateViewportSpaceAABB( const int viewportWidth, const int viewportHeight, const bool useUpdateSizeHint = false ) const; + + /** * Overriden delete operator. * Deletes the RenderItem from its global memory pool * @param[in] A pointer to the RenderItem to delete. @@ -65,15 +80,13 @@ struct RenderItem Matrix mModelMatrix; Matrix mModelViewMatrix; Vector3 mSize; + Vector3 mUpdateSizeHint; Render::Renderer* mRenderer; Node* mNode; - const void* mTextureSet; //< Used only for sorting - - mutable Render::Geometry* mBatchRenderGeometry; - + const void* mTextureSet; //< Used for sorting only int mDepthIndex; bool mIsOpaque:1; - bool mBatched:1; + bool mPartialUpdateEnabled:1; private: