Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Issue 605533002: Fix SkTextBlob offset semantics. (Closed)

Created:
6 years, 3 months ago by f(malita)
Modified:
6 years, 2 months ago
CC:
reviews_skia.org, jbroman
Base URL:
https://chromium.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Fix SkTextBlob offset semantics. Implement proper x/y drawTextBlob() handling by plumbing a drawPosText() offset parameter (to act as an additional glyph pos translation) throughout the device layer. The new offset superceeds the existing constY, with a minor semantic tweak: whereas previous implementations were ignoring constY in 2D positioning mode (scalarsPerGlyph == 2), now the offset is always observed, in all positioning modes. We can do this because existing drawPosText() clients always pass constY == 0 for full positioning mode. R=reed@google.com, jvanverth@google.com, robertphillips@google.com Committed: https://skia.googlesource.com/skia/+/c13bc571d3e61a43b87eb97f0719abd304cafaf2

Patch Set 1 #

Patch Set 2 : default run positioning fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -134 lines) Patch
M experimental/PdfViewer/SkTrackDevice.h View 1 chunk +3 lines, -3 lines 0 comments Download
M include/core/SkBitmapDevice.h View 1 chunk +2 lines, -2 lines 0 comments Download
M include/core/SkDevice.h View 1 chunk +2 lines, -2 lines 0 comments Download
M include/core/SkDraw.h View 2 chunks +4 lines, -4 lines 0 comments Download
M include/device/xps/SkXPSDevice.h View 1 chunk +2 lines, -2 lines 0 comments Download
M include/pdf/SkPDFDevice.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/core/SkBitmapDevice.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M src/core/SkCanvas.cpp View 2 chunks +7 lines, -2 lines 0 comments Download
M src/core/SkDevice.cpp View 1 2 chunks +6 lines, -24 lines 0 comments Download
M src/core/SkDraw.cpp View 5 chunks +7 lines, -9 lines 0 comments Download
M src/core/SkTextMapStateProc.h View 2 chunks +14 lines, -12 lines 0 comments Download
M src/device/xps/SkXPSDevice.cpp View 2 chunks +3 lines, -6 lines 0 comments Download
M src/gpu/GrBitmapTextContext.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/gpu/GrBitmapTextContext.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M src/gpu/GrDistanceFieldTextContext.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/gpu/GrDistanceFieldTextContext.cpp View 3 chunks +6 lines, -6 lines 0 comments Download
M src/gpu/GrStencilAndCoverTextContext.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/gpu/GrStencilAndCoverTextContext.cpp View 7 chunks +8 lines, -9 lines 0 comments Download
M src/gpu/GrTextContext.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/gpu/SkGpuDevice.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 3 chunks +6 lines, -8 lines 0 comments Download
M src/pdf/SkPDFDevice.cpp View 2 chunks +5 lines, -4 lines 0 comments Download
M src/pdf/SkPDFDeviceFlattener.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/pdf/SkPDFDeviceFlattener.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M src/utils/SkDeferredCanvas.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M src/utils/SkGatherPixelRefsAndRects.h View 2 chunks +7 lines, -12 lines 0 comments Download
M src/utils/SkPictureUtils.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
f(malita)
6 years, 3 months ago (2014-09-24 21:34:50 UTC) #1
f(malita)
This changes the SkDevice API and requires a Chromium update to be included with the ...
6 years, 3 months ago (2014-09-24 21:51:22 UTC) #2
reed1
Note : since we have "branched", you won't be able to update Chrome/Blink for this ...
6 years, 2 months ago (2014-09-25 19:04:40 UTC) #4
f(malita)
Committed patchset #2 (id:20001) manually as c13bc57 (presubmit successful).
6 years, 2 months ago (2014-09-26 14:33:41 UTC) #5
robertphillips
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/609223003/ by robertphillips@google.com. ...
6 years, 2 months ago (2014-09-29 11:48:09 UTC) #6
reed1
On 2014/09/29 11:48:09, robertphillips wrote: > A revert of this CL (patchset #2 id:20001) has ...
6 years, 2 months ago (2014-09-29 14:05:23 UTC) #7
f(malita)
6 years, 2 months ago (2014-09-29 14:36:14 UTC) #8
Message was sent while issue was closed.
On 2014/09/29 14:05:23, reed1 wrote:
> On 2014/09/29 11:48:09, robertphillips wrote:
> > A revert of this CL (patchset #2 id:20001) has been created in
> > https://codereview.chromium.org/609223003/ by
> mailto:robertphillips@google.com.
> > 
> > The reason for reverting is: Breaking the Chrome builds with the error:
> > 
> > [14:54:14.317833] ../../skia/ext/pixel_ref_utils.cc:221:16: error:
> 'drawPosText'
> > marked 'override' but does not override any member functions
> > [14:54:14.318022]   virtual void drawPosText(const SkDraw& draw,
> > [14:54:14.318082]                ^.
> 
> can we somehow remove the need for this device subclass? (for this and future
> refactorings)

Possibly: I'm not all that familiar with GatherPixelRefDevice, but at a glance
it seems to be replaceable with a canvas subclass.

Powered by Google App Engine
This is Rietveld 408576698