2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/integration-api/profiling.h>
22 #include <dali/integration-api/bitmap.h>
24 #include <dali/internal/event/common/thread-local-storage.h>
25 #include <dali/internal/event/events/gesture-event-processor.h>
27 #include <dali/internal/event/actors/actor-impl.h>
28 #include <dali/internal/event/actors/camera-actor-impl.h>
29 #include <dali/internal/event/actors/image-actor-impl.h>
30 #include <dali/internal/event/actors/layer-impl.h>
32 #include <dali/internal/event/actor-attachments/actor-attachment-impl.h>
33 #include <dali/internal/event/actor-attachments/camera-attachment-impl.h>
34 #include <dali/internal/event/actor-attachments/image-attachment-impl.h>
36 #include <dali/internal/event/animation/animation-impl.h>
37 #include <dali/internal/event/animation/animator-connector.h>
38 #include <dali/internal/event/animation/constraint-impl.h>
39 #include <dali/internal/update/animation/property-accessor.h>
40 #include <dali/internal/update/animation/scene-graph-animation.h>
41 #include <dali/internal/update/animation/scene-graph-constraint.h>
44 #include <dali/internal/event/images/image-impl.h>
45 #include <dali/internal/event/images/image-factory-cache.h>
47 #include <dali/internal/event/resources/resource-ticket.h>
48 #include <dali/internal/event/resources/image-ticket.h>
50 #include <dali/internal/update/nodes/node.h>
51 #include <dali/internal/update/nodes/scene-graph-layer.h>
53 #include <dali/internal/update/node-attachments/node-attachment.h>
54 #include <dali/internal/update/node-attachments/scene-graph-camera-attachment.h>
55 #include <dali/internal/update/node-attachments/scene-graph-image-attachment.h>
57 #include <dali/internal/update/rendering/scene-graph-renderer.h>
58 #include <dali/internal/update/resources/bitmap-metadata.h>
60 #include <dali/internal/render/gl-resources/bitmap-texture.h>
61 #include <dali/internal/render/renderers/render-geometry.h>
62 #include <dali/internal/render/renderers/render-image-renderer.h>
63 #include <dali/internal/render/renderers/render-new-renderer.h>
64 #include <dali/internal/render/renderers/render-property-buffer.h>
65 #include <dali/internal/render/renderers/render-renderer.h>
66 #include <dali/internal/render/renderers/render-sampler.h>
68 using Dali::Internal::GestureEventProcessor;
69 using Dali::Internal::ThreadLocalStorage;
77 void EnableProfiling( ProfilingType type )
79 GestureEventProcessor& eventProcessor = ThreadLocalStorage::Get().GetGestureEventProcessor();
83 case PROFILING_TYPE_PAN_GESTURE:
85 eventProcessor.EnablePanGestureProfiling();
88 case PROFILING_TYPE_END:
99 const int ANIMATION_MEMORY_SIZE(
100 sizeof( Internal::Animation ) +
101 sizeof( Internal::AnimatorConnector<float> ) +
102 sizeof( Internal::SceneGraph::Animation ) );
103 const int CONSTRAINT_MEMORY_SIZE(
104 sizeof( Internal::Constraint<float> ) +
105 sizeof( Internal::SceneGraph::Constraint<float, Internal::PropertyAccessor<float> > ) );
106 const int ACTOR_MEMORY_SIZE(
107 sizeof( Internal::Actor ) +
108 sizeof( Internal::ActorAttachment ) +
109 sizeof( Internal::SceneGraph::Node ) +
110 sizeof( Internal::SceneGraph::NodeAttachment ));
111 const int CAMERA_ACTOR_MEMORY_SIZE(
112 sizeof( Internal::CameraActor ) +
113 sizeof( Internal::CameraAttachment ) +
114 sizeof( Internal::SceneGraph::Node ) +
115 sizeof( Internal::SceneGraph::CameraAttachment ) );
116 const int IMAGE_ACTOR_MEMORY_SIZE(
117 sizeof( Internal::ImageActor ) +
118 sizeof( Internal::ImageAttachment ) +
119 sizeof( Internal::SceneGraph::Node ) +
120 sizeof( Internal::SceneGraph::ImageAttachment ) +
121 sizeof( Internal::Render::ImageRenderer ));
122 const int LAYER_MEMORY_SIZE(
123 sizeof( Internal::Layer ) +
124 sizeof( Internal::ActorAttachment ) +
125 sizeof( Internal::SceneGraph::Layer ) +
126 sizeof( Internal::SceneGraph::NodeAttachment ) );
127 const int IMAGE_MEMORY_SIZE(
128 sizeof( Internal::Image ) +
129 sizeof( Internal::ImageFactoryCache::Request ) +
130 sizeof( Integration::Bitmap ) +
131 sizeof( Internal::BitmapMetadata ) +
132 sizeof( Internal::BitmapTexture ) +
133 sizeof( Internal::ImageTicket ) );
134 const int RENDERER_MEMORY_SIZE(
135 sizeof( Internal::Renderer ) +
136 sizeof( Internal::SceneGraph::Renderer ) +
137 sizeof( Internal::Render::NewRenderer ) );
138 const int GEOMETRY_MEMORY_SIZE(
139 sizeof( Internal::Geometry ) +
140 sizeof( Internal::SceneGraph::Geometry ) +
141 sizeof( Internal::SceneGraph::RenderGeometry) );
142 const int PROPERTY_BUFFER_MEMORY_SIZE(
143 sizeof( Internal::PropertyBuffer ) +
144 sizeof( Internal::Render::PropertyBuffer ) );
145 const int MATERIAL_MEMORY_SIZE(
146 sizeof( Internal::Material ) +
147 sizeof( Internal::SceneGraph::Material ) );
148 const int SAMPLER_MEMORY_SIZE(
149 sizeof( Internal::Sampler ) +
150 sizeof( Internal::Render::Sampler ) );
151 const int SHADER_MEMORY_SIZE(
152 sizeof( Internal::Shader ) +
153 sizeof( Internal::SceneGraph::Shader ) );
155 } // namespace Profiling
157 } // namespace Integration