Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(270)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

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 #

Created: 14 years, 8 months ago
Download [raw] [tar.bz2]
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
Total messages: 6
|
mike3
14 years, 8 months ago (2011年04月25日 23:47:23 UTC) #1
Sign in to reply to this message.
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
Of course this will require a Chrome side change as well..
LGTM with one comment.
http://codereview.appspot.com/4436056/diff/9/src/core/SkCanvas.cpp
File src/core/SkCanvas.cpp (right):
http://codereview.appspot.com/4436056/diff/9/src/core/SkCanvas.cpp#newcode438
src/core/SkCanvas.cpp:438: if (factory) {
factory should never be NULL (if it is, you have a misbehaving device). Maybe
just SkASSERT(factory); ? Or leave this the way it was?
Sign in to reply to this message.
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
Thought about that. We have setDeviceFactory() which someone could pass NULL to
as well. I am considering changing the 
On 2011年04月26日 00:26:45, Steve VanDeBogart wrote:
> Of course this will require a Chrome side change as well..
> 
> LGTM with one comment.
> 
> http://codereview.appspot.com/4436056/diff/9/src/core/SkCanvas.cpp
> File src/core/SkCanvas.cpp (right):
> 
> http://codereview.appspot.com/4436056/diff/9/src/core/SkCanvas.cpp#newcode438
> src/core/SkCanvas.cpp:438: if (factory) {
> factory should never be NULL (if it is, you have a misbehaving device). Maybe
> just SkASSERT(factory); ? Or leave this the way it was?
Sign in to reply to this message.
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
Ignore that garbled message.
Its a good point. Uploaded a change to make this consistent with the bitmap
constructor.
On 2011年04月26日 00:34:20, mike3 wrote:
> Thought about that. We have setDeviceFactory() which someone could pass NULL
to
> as well. I am considering changing the 
> On 2011年04月26日 00:26:45, Steve VanDeBogart wrote:
> > Of course this will require a Chrome side change as well..
> > 
> > LGTM with one comment.
> > 
> > http://codereview.appspot.com/4436056/diff/9/src/core/SkCanvas.cpp
> > File src/core/SkCanvas.cpp (right):
> > 
> >
http://codereview.appspot.com/4436056/diff/9/src/core/SkCanvas.cpp#newcode438
> > src/core/SkCanvas.cpp:438: if (factory) {
> > factory should never be NULL (if it is, you have a misbehaving device). 
Maybe
> > just SkASSERT(factory); ? Or leave this the way it was?
Sign in to reply to this message.
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
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.
On 2011年04月26日 00:35:13, mike3 wrote:
> Ignore that garbled message.
> 
> Its a good point. Uploaded a change to make this consistent with the bitmap
> constructor.
> 
> On 2011年04月26日 00:34:20, mike3 wrote:
> > Thought about that. We have setDeviceFactory() which someone could pass NULL
> to
> > as well. I am considering changing the 
> > On 2011年04月26日 00:26:45, Steve VanDeBogart wrote:
> > > Of course this will require a Chrome side change as well..
> > > 
> > > LGTM with one comment.
> > > 
> > > http://codereview.appspot.com/4436056/diff/9/src/core/SkCanvas.cpp
> > > File src/core/SkCanvas.cpp (right):
> > > 
> > >
> http://codereview.appspot.com/4436056/diff/9/src/core/SkCanvas.cpp#newcode438
> > > src/core/SkCanvas.cpp:438: if (factory) {
> > > factory should never be NULL (if it is, you have a misbehaving device). 
> Maybe
> > > just SkASSERT(factory); ? Or leave this the way it was?
Sign in to reply to this message.
Steve VanDeBogart
On 2011年04月26日 12:27:56, bsalomon wrote: > LGTM. (Of course needs corresponding Chrome changes on next ...
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

AltStyle によって変換されたページ (->オリジナル) /