List items
Items from the current list are shown below.
Gecko
31 Oct 2023 : Day 76 #
Yesterday was taken up with forum moderation, but hopefully I'll be back on track today. Right now I'm on the train. I've debugged on the train before, but debugging with two phones simultaneously is a bit too much of a balancing act in the confined space. So I'm reading through the code to get familiar with it instead.
The method I'm reading through is SkDraw::drawRect() which I talked about a couple of days back. As the name suggests, this is a low-level primitive rectangle drawing routine. At this depth in the system the ESR 78 code and ESR 91 code are identical. It's a bit like being at the bottom of the ocean (I imagine): calm.
The method ends up either calling draw_rect_as_path() for a boundary rectangle or a variant of SkScan::FillRect() if it's filled.
In practice, when I run it in ESR 78 the type is of the form kFill_RectType which means it ends up going into this branch of a switch statement:
Next up is the ESR 91 version. Does it get to the same place? That'll have to be something to check tomorrow. With any luck it will be identical and then we'll have exhausted this part of the investigation.
For all the other entries in my developer diary, check out the Gecko-dev Diary page.
The method I'm reading through is SkDraw::drawRect() which I talked about a couple of days back. As the name suggests, this is a low-level primitive rectangle drawing routine. At this depth in the system the ESR 78 code and ESR 91 code are identical. It's a bit like being at the bottom of the ocean (I imagine): calm.
The method ends up either calling draw_rect_as_path() for a boundary rectangle or a variant of SkScan::FillRect() if it's filled.
In practice, when I run it in ESR 78 the type is of the form kFill_RectType which means it ends up going into this branch of a switch statement:
case kFill_RectType: if (paint.isAntiAlias()) { SkScan::AntiFillRect(devRect, clip, blitter); } else {## Day 77It then goes into the AntiFillRect() branch of the condition inside it. This eventually ends up inside this bit of code:
static void antifillrect(const SkXRect& xr, SkBlitter* blitter) { antifilldot8(SkFixedToFDot8(xr.fLeft), SkFixedToFDot8(xr.fTop), SkFixedToFDot8(xr.fRight), SkFixedToFDot8(xr.fBottom), blitter, true); }Which ends up calling blitter->blitRect(), which turns out to specialise to SkAAClipBlitter::blitRect(). That's quite a few nested calls, but as you can see, this is basically ending up by clearing the background:
SkARGB32_Blitter::blitRect (height=45, width=777, y=0, x=256, this=0x7fde8d2038)It still goes down a little further though. This calls the following method:
SkOpts::rect_memset32(device, color, width, rowBytes, height);Which ends up running the following snippet of templated code:
templateThat gets us to a memset which is realistically as far as I can dig with this.static void rect_memsetT(T buffer[], T value, int count, size_t rowBytes, int height) { while (height --> 0) { memsetT(buffer, value, count); buffer = (T*)((char*)buffer + rowBytes); } }
Next up is the ESR 91 version. Does it get to the same place? That'll have to be something to check tomorrow. With any luck it will be identical and then we'll have exhausted this part of the investigation.
For all the other entries in my developer diary, check out the Gecko-dev Diary page.
Comments
Uncover Disqus comments