Mir

Merge lp:~vanvugt/mir/typo-is-not-an-example into lp:mir

Proposed by Daniel van Vugt
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 3749
Proposed branch: lp:~vanvugt/mir/typo-is-not-an-example
Merge into: lp:mir
Diff against target: 170 lines (+24/-24)
8 files modified
playground/demo-shell/typo/typo_freetype_renderer.cpp (+1/-1)
playground/demo-shell/typo/typo_freetype_renderer.h (+5/-5)
playground/demo-shell/typo/typo_glcache.cpp (+1/-1)
playground/demo-shell/typo/typo_glcache.h (+5/-5)
playground/demo-shell/typo/typo_renderer.cpp (+1/-1)
playground/demo-shell/typo/typo_renderer.h (+5/-5)
playground/demo-shell/typo/typo_stub_renderer.cpp (+1/-1)
playground/demo-shell/typo/typo_stub_renderer.h (+5/-5)
To merge this branch: bzr merge lp:~vanvugt/mir/typo-is-not-an-example
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Approve
Alan Griffiths Needs Fixing
Cemil Azizoglu (community) Approve
Review via email: mp+307910@code.launchpad.net

Commit message

Rename namespace mir::examples::typo -> mir::typo

Because it's not an example. In fact, libtypo is designed to not depend
on Mir-anything at all. It could even become an external project later
(with a different name, because the current one is not unique enough).

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3745
https://mir-jenkins.ubuntu.com/job/mir-ci/1909/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/2424
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2487
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2479
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2479
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2479
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2453
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2453/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2453
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2453/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2453
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2453/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2453
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2453/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2453
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2453/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2453
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2453/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/1909/rebuild

review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I don't have any problem with moving or publishing this functionality, but I don't find the interface particularly attractive. Could we first tidy that up?

review: Needs Information
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> I don't have any problem with moving or publishing this functionality, but I
> don't find the interface particularly attractive. Could we first tidy that up?

I mean stuff like: Renderer::Image having public data and being copyable. Both of which make it easy to get undefined behaviour.

Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

This is not publishing it so ok by me. Perhaps Alan's comments apply to the other branch.

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sounds like something that's easy to fix in a separate independent branch...

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/665/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/2446/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/706/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2509
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2501
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2501
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2501
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2475/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2475
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2475/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2475/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2475
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2475/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2475
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2475/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2475
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2475/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

^^^
Archive sync problems again.

03:48:43 W: No sandbox user '_apt' on the system, can not drop privileges
03:48:43 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-6/libobjc4_6.2.0-5ubuntu11_amd64.deb 404 Not Found [IP: 91.189.92.201 80]
03:48:43 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-6/libobjc-6-dev_6.2.0-5ubuntu11_amd64.deb 404 Not Found [IP: 91.189.92.201 80]
03:48:43 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Alan:
I see what you mean although differ in opinion. I personally tend toward the simpler (less idiotproof) code than strengthening it, given that Image is implicitly for internal use only. External users go through GLCache instead and never deal with Image. But here tis:
  https://code.launchpad.net/~vanvugt/mir/safer-typo-image/+merge/308020

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> This is not publishing it so ok by me. Perhaps Alan's comments apply to the
> other branch.

"example" at least allows the inference this isn't production quality code. I'd prefer it cleaned up before we start that process.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> > This is not publishing it so ok by me. Perhaps Alan's comments apply to the
> > other branch.
>
> "example" at least allows the inference this isn't production quality code.
> I'd prefer it cleaned up before we start that process.

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That comment is irrationally passive aggressive. You're saying that a library that's never had any bugs is "not production quality" just because you don't like the style.

Although I did the clean up you requested, to me it feels much less clean.

Revision history for this message
Mir CI Bot (mir-ci-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'playground/demo-shell/typo/typo_freetype_renderer.cpp'
--- playground/demo-shell/typo/typo_freetype_renderer.cpp 2015-02-27 03:22:32 +0000
+++ playground/demo-shell/typo/typo_freetype_renderer.cpp 2016-10-07 07:26:22 +0000
@@ -20,7 +20,7 @@
20#include <stdexcept>20#include <stdexcept>
21#include <cstring>21#include <cstring>
2222
23using namespace mir::examples::typo;23using namespace mir::typo;
2424
25FreetypeRenderer::FreetypeRenderer()25FreetypeRenderer::FreetypeRenderer()
26 : lib(nullptr), face(nullptr), preferred_height(16)26 : lib(nullptr), face(nullptr), preferred_height(16)
2727
=== modified file 'playground/demo-shell/typo/typo_freetype_renderer.h'
--- playground/demo-shell/typo/typo_freetype_renderer.h 2015-02-20 06:24:57 +0000
+++ playground/demo-shell/typo/typo_freetype_renderer.h 2016-10-07 07:26:22 +0000
@@ -16,14 +16,14 @@
16 * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>16 * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
17 */17 */
1818
19#ifndef MIR_EXAMPLES_TYPO_FREETYPE_RENDERER_H_19#ifndef MIR_TYPO_FREETYPE_RENDERER_H_
20#define MIR_EXAMPLES_TYPO_FREETYPE_RENDERER_H_20#define MIR_TYPO_FREETYPE_RENDERER_H_
2121
22#include "typo_renderer.h"22#include "typo_renderer.h"
23#include <ft2build.h>23#include <ft2build.h>
24#include FT_FREETYPE_H24#include FT_FREETYPE_H
2525
26namespace mir { namespace examples { namespace typo {26namespace mir { namespace typo {
2727
28class FreetypeRenderer : public Renderer28class FreetypeRenderer : public Renderer
29{29{
@@ -39,6 +39,6 @@
39 int preferred_height;39 int preferred_height;
40};40};
4141
42} } } // namespace mir::examples::typo42} } // namespace mir::typo
4343
44#endif // MIR_EXAMPLES_TYPO_FREETYPE_RENDERER_H_44#endif // MIR_TYPO_FREETYPE_RENDERER_H_
4545
=== modified file 'playground/demo-shell/typo/typo_glcache.cpp'
--- playground/demo-shell/typo/typo_glcache.cpp 2016-05-13 08:03:23 +0000
+++ playground/demo-shell/typo/typo_glcache.cpp 2016-10-07 07:26:22 +0000
@@ -19,7 +19,7 @@
19#include "typo_glcache.h"19#include "typo_glcache.h"
20#include MIR_SERVER_GL_H20#include MIR_SERVER_GL_H
2121
22using namespace mir::examples::typo;22using namespace mir::typo;
2323
24GLCache::GLCache(std::shared_ptr<Renderer> const& r)24GLCache::GLCache(std::shared_ptr<Renderer> const& r)
25 : renderer(r)25 : renderer(r)
2626
=== modified file 'playground/demo-shell/typo/typo_glcache.h'
--- playground/demo-shell/typo/typo_glcache.h 2015-02-20 06:24:57 +0000
+++ playground/demo-shell/typo/typo_glcache.h 2016-10-07 07:26:22 +0000
@@ -16,15 +16,15 @@
16 * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>16 * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
17 */17 */
1818
19#ifndef MIR_EXAMPLES_TYPO_GLCACHE_H_19#ifndef MIR_TYPO_GLCACHE_H_
20#define MIR_EXAMPLES_TYPO_GLCACHE_H_20#define MIR_TYPO_GLCACHE_H_
2121
22#include "typo_renderer.h"22#include "typo_renderer.h"
23#include <string>23#include <string>
24#include <unordered_map>24#include <unordered_map>
25#include <memory>25#include <memory>
2626
27namespace mir { namespace examples { namespace typo {27namespace mir { namespace typo {
2828
29class GLCache29class GLCache
30{30{
@@ -51,6 +51,6 @@
51 std::shared_ptr<Renderer> renderer;51 std::shared_ptr<Renderer> renderer;
52};52};
5353
54} } } // namespace mir::examples::typo54} } // namespace mir::typo
5555
56#endif // MIR_EXAMPLES_TYPO_GLCACHE_H_56#endif // MIR_TYPO_GLCACHE_H_
5757
=== modified file 'playground/demo-shell/typo/typo_renderer.cpp'
--- playground/demo-shell/typo/typo_renderer.cpp 2015-02-19 09:30:02 +0000
+++ playground/demo-shell/typo/typo_renderer.cpp 2016-10-07 07:26:22 +0000
@@ -19,7 +19,7 @@
19#include "typo_renderer.h"19#include "typo_renderer.h"
20#include <cstring>20#include <cstring>
2121
22using namespace mir::examples::typo;22using namespace mir::typo;
2323
24Renderer::Image::Image()24Renderer::Image::Image()
25 : buf(nullptr), width(0), stride(0), height(0), align(4), format(alpha8)25 : buf(nullptr), width(0), stride(0), height(0), align(4), format(alpha8)
2626
=== modified file 'playground/demo-shell/typo/typo_renderer.h'
--- playground/demo-shell/typo/typo_renderer.h 2015-02-20 06:24:57 +0000
+++ playground/demo-shell/typo/typo_renderer.h 2016-10-07 07:26:22 +0000
@@ -16,10 +16,10 @@
16 * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>16 * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
17 */17 */
1818
19#ifndef MIR_EXAMPLES_TYPO_RENDERER_H_19#ifndef MIR_TYPO_RENDERER_H_
20#define MIR_EXAMPLES_TYPO_RENDERER_H_20#define MIR_TYPO_RENDERER_H_
2121
22namespace mir { namespace examples { namespace typo {22namespace mir { namespace typo {
2323
24class Renderer24class Renderer
25{25{
@@ -42,6 +42,6 @@
42 static unsigned long unicode_from_utf8(char const** utf8);42 static unsigned long unicode_from_utf8(char const** utf8);
43};43};
4444
45} } } // namespace mir::examples::typo45} } // namespace mir::typo
4646
47#endif // MIR_EXAMPLES_TYPO_RENDERER_H_47#endif // MIR_TYPO_RENDERER_H_
4848
=== modified file 'playground/demo-shell/typo/typo_stub_renderer.cpp'
--- playground/demo-shell/typo/typo_stub_renderer.cpp 2015-02-19 09:12:04 +0000
+++ playground/demo-shell/typo/typo_stub_renderer.cpp 2016-10-07 07:26:22 +0000
@@ -19,7 +19,7 @@
19#include "typo_stub_renderer.h"19#include "typo_stub_renderer.h"
20#include <cstring>20#include <cstring>
2121
22using namespace mir::examples::typo;22using namespace mir::typo;
2323
24void StubRenderer::render(char const* str, Image& img)24void StubRenderer::render(char const* str, Image& img)
25{25{
2626
=== modified file 'playground/demo-shell/typo/typo_stub_renderer.h'
--- playground/demo-shell/typo/typo_stub_renderer.h 2015-02-20 06:24:57 +0000
+++ playground/demo-shell/typo/typo_stub_renderer.h 2016-10-07 07:26:22 +0000
@@ -16,12 +16,12 @@
16 * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>16 * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
17 */17 */
1818
19#ifndef MIR_EXAMPLES_TYPO_STUB_RENDERER_H_19#ifndef MIR_TYPO_STUB_RENDERER_H_
20#define MIR_EXAMPLES_TYPO_STUB_RENDERER_H_20#define MIR_TYPO_STUB_RENDERER_H_
2121
22#include "typo_renderer.h"22#include "typo_renderer.h"
2323
24namespace mir { namespace examples { namespace typo {24namespace mir { namespace typo {
2525
26class StubRenderer : public Renderer26class StubRenderer : public Renderer
27{27{
@@ -29,6 +29,6 @@
29 void render(char const* str, Image& img) override;29 void render(char const* str, Image& img) override;
30};30};
3131
32} } } // namespace mir::examples::typo32} } // namespace mir::typo
3333
34#endif // MIR_EXAMPLES_TYPO_STUB_RENDERER_H_34#endif // MIR_TYPO_STUB_RENDERER_H_

Subscribers

People subscribed via source and target branches