flypig.co.uk

List items

Items from the current list are shown below.

Gecko

6 Sep 2023 : Day 21 #
Yesterday I boldly stated "I've now got to the stage where it's plausible it might compile".

And did it compile?

Of course it didn't. I got a bunch of errors (type mismatches, missing methods, etc.) from my new code that I'm going to try to fix today.

Here's an abridged version of the errors:
105:23.30 ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp: In function
          ‘bool mozilla::gl::Swap(const IntSize&)’:
105:23.30 ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:148:7: error:
          ‘mFactory’ was not declared in this scope
105:23.30        mFactory->CreateShared(size);
105:23.30        ^~~~~~~~
105:23.30 ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:157:3: error:
          ‘mFrontBuffer’ was not declared in this scope
105:23.30    mFrontBuffer = mPresenter->mBackBuffer;
105:23.30    ^~~~~~~~~~~~
105:23.31 ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:157:3: note:
          suggested alternative: ‘nsStringBuffer’
105:23.31    mFrontBuffer = mPresenter->mBackBuffer;
105:23.31    ^~~~~~~~~~~~
105:23.31    nsStringBuffer
105:23.31 ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:157:18: error:
          ‘mPresenter’ was not declared in this scope
105:23.31    mFrontBuffer = mPresenter->mBackBuffer;
105:23.31                   ^~~~~~~~~~
105:23.31 ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:157:18: note:
          suggested alternative: ‘register’
105:23.31    mFrontBuffer = mPresenter->mBackBuffer;
105:23.31                   ^~~~~~~~~~
105:23.31                   register
105:23.31 ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:160:7: error:
          ‘mPreserve’ was not declared in this scope
105:23.31    if (mPreserve && mFrontBuffer && mPresenter->mBackBuffer) {
105:23.31        ^~~~~~~~~
105:23.31 ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:161:25: error:
          ‘ProdCopy’ is not a member of ‘mozilla::gl::SharedSurface’
105:23.31      if (!SharedSurface::ProdCopy(mFrontBuffer, mPresenter->Surf()->ProducerRelease();
105:23.32                 ^~~~
105:23.53 make[4]: *** [${PROJECT}/gecko-dev/config/rules.mk:676: GLScreenBuffer.o] Error 1
This is all stupid stuff: if I'd read through the code I wrote yesterday more carefully I'd have been able to address these without having to run the build. This just highlights to me how reliant I've become on having the compiler flag up errors.

So, I've made a host of additional changes. At the same time I reworked some of the rendering logic so that — in my opinion at least — it makes more sense now. There's no way the logic will survive contact with reality, but even if not it's still been beneficial in two ways. First it's forced me to think about what's going on and how it should work. Second it will provide a framework to fill out when we reach a point where it can be tested.

So we'll return to this topic of rendering in the future. In the meantime, after three days of hacking around with this, I'll be quite happy not to have to think about it again!

A fresh build is now running. Let's see where this has taken us tomorrow.

Once again, for all the other posts, check out my full Gecko Dev Diary.

Comments

Uncover Disqus comments