mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-26 09:19:27 +00:00
Change CelList and LayerList from std::list to std::vector
This change gives us an huge performance improvement to paint the Timeline widget.
This commit is contained in:
parent
11c70ab522
commit
510a686020
@ -1,5 +1,5 @@
|
||||
// Aseprite Document Library
|
||||
// Copyright (c) 2001-2014 David Capello
|
||||
// Copyright (c) 2001-2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -8,15 +8,15 @@
|
||||
#define DOC_CEL_LIST_H_INCLUDED
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
namespace doc {
|
||||
|
||||
class Cel;
|
||||
|
||||
typedef std::list<Cel*> CelList;
|
||||
typedef std::list<Cel*>::iterator CelIterator;
|
||||
typedef std::list<Cel*>::const_iterator CelConstIterator;
|
||||
typedef std::vector<Cel*> CelList;
|
||||
typedef CelList::iterator CelIterator;
|
||||
typedef CelList::const_iterator CelConstIterator;
|
||||
|
||||
} // namespace doc
|
||||
|
||||
|
@ -316,7 +316,7 @@ void LayerFolder::stackLayer(Layer* layer, Layer* after)
|
||||
m_layers.insert(after_it, layer);
|
||||
}
|
||||
else
|
||||
m_layers.push_front(layer);
|
||||
m_layers.insert(m_layers.begin(), layer);
|
||||
}
|
||||
|
||||
void LayerFolder::displaceFrames(frame_t fromThis, frame_t delta)
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Document Library
|
||||
// Copyright (c) 2001-2014 David Capello
|
||||
// Copyright (c) 2001-2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -8,15 +8,15 @@
|
||||
#define DOC_LAYER_LIST_H_INCLUDED
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
namespace doc {
|
||||
|
||||
class Layer;
|
||||
|
||||
typedef std::list<Layer*> LayerList;
|
||||
typedef std::list<Layer*>::iterator LayerIterator;
|
||||
typedef std::list<Layer*>::const_iterator LayerConstIterator;
|
||||
typedef std::vector<Layer*> LayerList;
|
||||
typedef LayerList::iterator LayerIterator;
|
||||
typedef LayerList::const_iterator LayerConstIterator;
|
||||
|
||||
} // namespace doc
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user