[Widelands-dev] Bunnybot says...

2016-01-19 Thread bunnybot
Bunnybot encountered an error while working on this merge proposal:

Running 'git fetch bzr_origin' failed. Output:

Traceback (most recent call last):
  File "/usr/local/bin/git-remote-bzr", line 1022, in 
sys.exit(main(sys.argv))
  File "/usr/local/bin/git-remote-bzr", line 994, in main
repo = get_repo(url, alias)
  File "/usr/local/bin/git-remote-bzr", line 870, in get_repo
origin = bzrlib.bzrdir.BzrDir.open(url, possible_transports=transports)
  File "/usr/lib/python2.7/dist-packages/bzrlib/controldir.py", line 689, in 
open
_unsupported=_unsupported)
  File "/usr/lib/python2.7/dist-packages/bzrlib/controldir.py", line 718, in 
open_from_transport
find_format, transport, redirected)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/__init__.py", line 
1719, in do_catching_redirections
return action(transport)
  File "/usr/lib/python2.7/dist-packages/bzrlib/controldir.py", line 706, in 
find_format
probers=probers)
  File "/usr/lib/python2.7/dist-packages/bzrlib/controldir.py", line 1155, in 
find_format
raise errors.NotBranchError(path=transport.base)
bzrlib.errors.NotBranchError: Not a branch: 
"/file:/home/bunnybot/bunnybot/data/bzr_repo/".

-- 
https://code.launchpad.net/~widelands-dev/widelands/resize_texture_cache/+merge/283048
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/resize_texture_cache into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] Bunnybot says...

2016-01-19 Thread bunnybot
Bunnybot encountered an error while working on this merge proposal:

Running 'git fetch bzr_origin' failed. Output:

Traceback (most recent call last):
  File "/usr/local/bin/git-remote-bzr", line 1022, in 
sys.exit(main(sys.argv))
  File "/usr/local/bin/git-remote-bzr", line 994, in main
repo = get_repo(url, alias)
  File "/usr/local/bin/git-remote-bzr", line 870, in get_repo
origin = bzrlib.bzrdir.BzrDir.open(url, possible_transports=transports)
  File "/usr/lib/python2.7/dist-packages/bzrlib/controldir.py", line 687, in 
open
t = _mod_transport.get_transport(base, possible_transports)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/__init__.py", line 
1680, in get_transport
return get_transport_from_url(location_to_url(base), possible_transports)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/__init__.py", line 
1655, in get_transport_from_url
transport, last_err = _try_transport_factories(url, factory_list)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/__init__.py", line 
1687, in _try_transport_factories
return factory.get_obj()(base), None
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/remote.py", line 95, 
in __init__
url, _from_transport=_from_transport)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/__init__.py", line 
1362, in __init__
self._parsed_url = self._split_url(base)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/__init__.py", line 
1417, in _split_url
return urlutils.URL.from_string(url)
  File "/usr/lib/python2.7/dist-packages/bzrlib/urlutils.py", line 875, in 
from_string
(port, url))
bzrlib.errors.InvalidURL: Invalid url supplied to transport: "invalid port 
number  in url:
bzr://file:///home/bunnybot/bunnybot/data/bzr_repo/"

-- 
https://code.launchpad.net/~widelands-dev/widelands/resize_texture_cache/+merge/283048
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/resize_texture_cache into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] Bunnybot says...

2016-01-19 Thread bunnybot
Travis build 307 has changed state to: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/103335898.
-- 
https://code.launchpad.net/~widelands-dev/widelands/resize_texture_cache/+merge/283048
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/resize_texture_cache into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] Bunnybot says...

2016-01-19 Thread bunnybot
Travis build 304 has changed state to: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/103304106.
-- 
https://code.launchpad.net/~widelands-dev/widelands/screenshot_from_backbuffer/+merge/283043
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/screenshot_from_backbuffer into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] Bunnybot says...

2016-01-19 Thread bunnybot
Hi, I am bunnybot (https://github.com/widelands/bunnybot).

I am keeping the source branch lp:~widelands-dev/widelands/resize_texture_cache 
mirrored to 
https://github.com/widelands/widelands/tree/_widelands_dev_widelands_resize_texture_cache

You can give me commands by starting a line with @bunnybot . I 
understand: 
 merge: Merges the source branch into the target branch, closing the merge 
proposal. I will use the proposed commit message if it is set.
-- 
https://code.launchpad.net/~widelands-dev/widelands/resize_texture_cache/+merge/283048
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/resize_texture_cache into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] Bunnybot says...

2016-01-19 Thread bunnybot
Hi, I am bunnybot (https://github.com/widelands/bunnybot).

I am keeping the source branch 
lp:~widelands-dev/widelands/screenshot_from_backbuffer mirrored to 
https://github.com/widelands/widelands/tree/_widelands_dev_widelands_screenshot_from_backbuffer

You can give me commands by starting a line with @bunnybot . I 
understand: 
 merge: Merges the source branch into the target branch, closing the merge 
proposal. I will use the proposed commit message if it is set.
-- 
https://code.launchpad.net/~widelands-dev/widelands/screenshot_from_backbuffer/+merge/283043
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/screenshot_from_backbuffer into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~hjd/widelands/tests-poc into lp:~widelands-dev/widelands/debian

2016-01-19 Thread SirVer
I suggest closing this as we are running the regression test now for each merge 
proposal on travis via bunnybot. Do you agree, hjd?
-- 
https://code.launchpad.net/~hjd/widelands/tests-poc/+merge/250533
Your team Widelands Developers is requested to review the proposed merge of 
lp:~hjd/widelands/tests-poc into lp:~widelands-dev/widelands/debian.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/resize_texture_cache into lp:widelands

2016-01-19 Thread SirVer
SirVer has proposed merging lp:~widelands-dev/widelands/resize_texture_cache 
into lp:widelands.

Commit message:
- Resize texture cache to 30 MB.
- Simplify texture cache: It only deals with transient surfaces and uses less 
virtual functions and no pointers.

Fixes bug 1121944.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/resize_texture_cache/+merge/283048

Simplifies the texture cache used by the new font renderer. 


-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/resize_texture_cache into lp:widelands.
=== modified file 'src/graphic/font_handler1.cc'
--- src/graphic/font_handler1.cc	2016-01-09 15:27:05 +
+++ src/graphic/font_handler1.cc	2016-01-19 08:57:55 +
@@ -45,9 +45,14 @@
 
 namespace {
 
-/// The size of the richtext surface cache in bytes. All work that the richtext
-/// renderer does is / cached in this cache until it overflows.
-const uint32_t RICHTEXT_SURFACE_CACHE = 160 << 20;   // shifting converts to MB
+// The size of the richtext surface cache in bytes. All work that the richtext
+// renderer does is / cached in this cache until it overflows. The idea is that
+// this is big enough to cache the text that is used on a typical screen - so
+// that we do not need to lay out text every frame. Last benchmarked at r7712,
+// 30 MB was enough to cache texts for many frames (> 1000), while it is
+// quickly overflowing in the map selection menu.
+// This might need reevaluation is the new font handler is used for more stuff.
+const uint32_t RICHTEXT_TEXTURE_CACHE = 30 << 20;   // shifting converts to MB
 
 // An Image implementation that recreates a rich text texture when needed on
 // the fly. It is meant to be saved into the ImageCache.
@@ -80,9 +85,8 @@
 		if (surf)
 			return surf;
 
-		surf = get_renderer_()->render(text_, width_);
-		texture_cache_->insert(hash_, surf, true);
-		return surf;
+		return texture_cache_->insert(
+		   hash_, std::unique_ptr(get_renderer_()->render(text_, width_)));
 	}
 
 	const string hash_;
@@ -104,7 +108,7 @@
 class FontHandler1 : public IFontHandler1 {
 public:
 	FontHandler1(ImageCache* image_cache)
-	   : texture_cache_(create_texture_cache(RICHTEXT_SURFACE_CACHE)),
+	   : texture_cache_(new TextureCache(RICHTEXT_TEXTURE_CACHE)),
 	 fontset_(new UI::FontSet(i18n::get_locale())),
 	 rt_renderer_(new RT::Renderer(image_cache, texture_cache_.get(), fontset_.get())),
 	 image_cache_(image_cache) {

=== modified file 'src/graphic/text/sdl_ttf_font.cc'
--- src/graphic/text/sdl_ttf_font.cc	2014-11-24 07:10:03 +
+++ src/graphic/text/sdl_ttf_font.cc	2016-01-19 08:57:55 +
@@ -120,7 +120,7 @@
 	if (!text_surface)
 		throw RenderError((format("Rendering '%s' gave the error: %s") % txt % TTF_GetError()).str());
 
-	return *texture_cache->insert(hash, new Texture(text_surface), true);
+	return *texture_cache->insert(hash, std::unique_ptr(new Texture(text_surface)));
 }
 
 uint16_t SdlTtfFont::ascent(int style) const {

=== modified file 'src/graphic/text/test/render.cc'
--- src/graphic/text/test/render.cc	2014-12-14 12:16:27 +
+++ src/graphic/text/test/render.cc	2016-01-19 08:57:55 +
@@ -35,7 +35,7 @@
 	g_fs->add_file_system(&FileSystem::create(WIDELANDS_DATA_DIR));
 	g_fs->add_file_system(&FileSystem::create(RICHTEXT_DATA_DIR));
 
-	texture_cache_.reset(create_texture_cache(500 << 20));  // 500 MB
+	texture_cache_.reset(new TextureCache(500 << 20));  // 500 MB
 	image_cache_.reset(new ImageCache());
 	renderer_.reset(new RT::Renderer(image_cache_.get(), texture_cache_.get(), new UI::FontSet("en")));
 }

=== modified file 'src/graphic/texture_cache.cc'
--- src/graphic/texture_cache.cc	2014-11-24 07:10:03 +
+++ src/graphic/texture_cache.cc	2016-01-19 08:57:55 +
@@ -19,117 +19,68 @@
 
 #include "graphic/texture_cache.h"
 
-#include 
-#include 
-#include 
-#include 
+#include 
 
 #include 
 
 #include "graphic/texture.h"
-
-using namespace std;
-
-// I took inspiration from http://timday.bitbucket.org/lru.html, but our use
-// case here is a little different.
-namespace  {
-class TextureCacheImpl : public TextureCache {
-public:
-	TextureCacheImpl(uint32_t max_transient_memory) :
-		max_transient_memory_(max_transient_memory), used_transient_memory_(0) {}
-	virtual ~TextureCacheImpl();
-
-	// Implements TextureCache.
-	void flush() override;
-	Texture* get(const string& hash) override;
-	Texture* insert(const string& hash, Texture*, bool) override;
-
-private:
-	void drop();
-
-	using AccessHistory = list;
-	struct Entry {
-		Entry(Texture* gs, const AccessHistory::iterator& it, bool transient) :
-			texture(gs), is_transient(transient), last_access(SDL_GetTicks()), list_iterator(it) {}
-
-		std::unique_ptr texture;
-		bool is_transient;
-		uint32_t last_access;  // Mainly for debugging and analysis.
-		const AccessHistory::iterator list_iterator;  // Only valid if is_transient 

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix_editor_transparency_issue into lp:widelands

2016-01-19 Thread kaputtnik
Review: Approve functionality

Works now :-)

Regarding to game speed, i couldn't quantify this. Short after a game starts 
scrolling is generally not smooth for a short time. And because the crash 
happen after a short time of scrolling, i may thought it is generally slow.

Without the crash i think the speed is equal to trunk.

-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_editor_transparency_issue/+merge/282874
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/fix_editor_transparency_issue.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp