2 * Copyright (c) 2018 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/layer-impl.h>
31 #include <dali/internal/event/animation/animation-impl.h>
32 #include <dali/internal/event/animation/animator-connector.h>
33 #include <dali/internal/event/animation/constraint-impl.h>
34 #include <dali/internal/update/animation/property-accessor.h>
35 #include <dali/internal/update/animation/scene-graph-animation.h>
36 #include <dali/internal/update/animation/scene-graph-constraint.h>
39 #include <dali/internal/event/images/image-impl.h>
41 #include <dali/internal/update/nodes/node.h>
42 #include <dali/internal/update/nodes/scene-graph-layer.h>
44 #include <dali/internal/update/rendering/scene-graph-renderer.h>
46 #include <dali/internal/render/renderers/render-geometry.h>
47 #include <dali/internal/render/renderers/render-property-buffer.h>
48 #include <dali/internal/render/renderers/render-renderer.h>
49 #include <dali/internal/render/renderers/render-sampler.h>
50 #include <dali/internal/update/render-tasks/scene-graph-camera.h>
52 using Dali::Internal::GestureEventProcessor;
53 using Dali::Internal::ThreadLocalStorage;
61 void EnableProfiling( ProfilingType type )
63 GestureEventProcessor& eventProcessor = ThreadLocalStorage::Get().GetGestureEventProcessor();
67 case PROFILING_TYPE_PAN_GESTURE:
69 eventProcessor.EnablePanGestureProfiling();
72 case PROFILING_TYPE_END:
83 const std::size_t ANIMATION_MEMORY_SIZE(
84 sizeof( Internal::Animation ) +
85 sizeof( Internal::AnimatorConnector<float> ) +
86 sizeof( Internal::SceneGraph::Animation ) );
87 const std::size_t CONSTRAINT_MEMORY_SIZE(
88 sizeof( Internal::Constraint<float> ) +
89 sizeof( Internal::SceneGraph::Constraint<float, Internal::PropertyAccessor<float> > ) );
90 const std::size_t ACTOR_MEMORY_SIZE(
91 sizeof( Internal::Actor ) +
92 sizeof( Internal::SceneGraph::Node ) );
93 const std::size_t CAMERA_ACTOR_MEMORY_SIZE(
94 sizeof( Internal::CameraActor ) +
95 sizeof( Internal::SceneGraph::Node ) +
96 sizeof( Internal::SceneGraph::Camera ) );
97 const std::size_t LAYER_MEMORY_SIZE(
98 sizeof( Internal::Layer ) +
99 sizeof( Internal::SceneGraph::Layer ) );
100 const std::size_t IMAGE_MEMORY_SIZE(
101 sizeof( Internal::Image ) +
102 sizeof( Integration::Bitmap ) );
103 const std::size_t RENDERER_MEMORY_SIZE(
104 sizeof( Internal::Renderer ) +
105 sizeof( Internal::SceneGraph::Renderer ) +
106 sizeof( Internal::Render::Renderer ) );
107 const std::size_t GEOMETRY_MEMORY_SIZE(
108 sizeof( Internal::Geometry ) +
109 sizeof( Internal::Render::Geometry) );
110 const std::size_t PROPERTY_BUFFER_MEMORY_SIZE(
111 sizeof( Internal::PropertyBuffer ) +
112 sizeof( Internal::Render::PropertyBuffer ) );
113 const std::size_t TEXTURE_SET_MEMORY_SIZE(
114 sizeof( Internal::TextureSet ) +
115 sizeof( Internal::SceneGraph::TextureSet ) );
116 const std::size_t SAMPLER_MEMORY_SIZE(
117 sizeof( Internal::Sampler ) +
118 sizeof( Internal::Render::Sampler ) );
119 const std::size_t SHADER_MEMORY_SIZE(
120 sizeof( Internal::Shader ) +
121 sizeof( Internal::SceneGraph::Shader ) );
123 } // namespace Profiling
125 } // namespace Integration