Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(409)

Issue 4436056: make SkDeviceFactory reference counted

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 8 months ago by mike3
Modified:
14 years, 8 months ago
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Patch Set 1 #

Patch Set 2 : add gpu files #

Patch Set 3 : all files #

Total comments: 1

Patch Set 4 : assume device->getDeviceFactory never returns null #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -27 lines) Patch
M include/core/SkCanvas.h View 2 1 chunk +5 lines, -2 lines 0 comments Download
M include/core/SkDevice.h View 2 4 chunks +17 lines, -4 lines 0 comments Download
M include/gpu/SkGpuDevice.h View 2 1 chunk +3 lines, -0 lines 0 comments Download
M include/pdf/SkPDFDevice.h View 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 chunks +17 lines, -9 lines 0 comments Download
M src/core/SkDevice.cpp View 2 2 chunks +35 lines, -1 line 0 comments Download
M src/gpu/SkGpuCanvas.cpp View 1 1 chunk +4 lines, -7 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/pdf/SkPDFDevice.cpp View 2 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 6
mike3
14 years, 8 months ago (2011-04-25 23:47:23 UTC) #1
Steve VanDeBogart
Of course this will require a Chrome side change as well.. LGTM with one comment. ...
14 years, 8 months ago (2011-04-26 00:26:45 UTC) #2
mike3
Thought about that. We have setDeviceFactory() which someone could pass NULL to as well. I ...
14 years, 8 months ago (2011-04-26 00:34:20 UTC) #3
mike3
Ignore that garbled message. Its a good point. Uploaded a change to make this consistent ...
14 years, 8 months ago (2011-04-26 00:35:13 UTC) #4
bsalomon
LGTM. (Of course needs corresponding Chrome changes on next DEPS roll) I was thinking that ...
14 years, 8 months ago (2011-04-26 12:27:56 UTC) #5
Steve VanDeBogart
14 years, 8 months ago (2011-04-26 16:29:55 UTC) #6
On 2011/04/26 12:27:56, bsalomon wrote:
> LGTM. (Of course needs corresponding Chrome changes on next DEPS roll)
> 
> I was thinking that we suffer a bit from not being able to have pure virtuals
on
> SkDevice. SkDevice is serving as both the raster implementation and the
> interface definition. We get no errors or warnings if a subclass forgets to
> implement something (or a new virtual is added to the SkDevice). It might not
be
> a bad idea for us to create an SkBaseDevice and make everyone inherit from it.
> It might not quite so easy since PDF and GPU probably rely on quite a bit of
> functionality in SkDevice and it'd take time to figure out what should be
> promoted up to the base class.

+1  I'm all in favor of an abstract base class for devices.

LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b