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

Issue 7098051: first draft of runtime config. system (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by Humper
Modified:
11 years, 5 months ago
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

first draft of runtime config. system BUG= Committed: https://code.google.com/p/skia/source/detail?r=7158

Patch Set 1 #

Total comments: 2

Patch Set 2 : Whitespace fixes #

Total comments: 22

Patch Set 3 : Addresses all concerns from previous upload; still need to implement getline for other ports (e.g.,… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+556 lines, -19 lines) Patch
M gyp/common.gypi View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M gyp/core.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M gyp/gpu.gyp View 2 chunks +2 lines, -0 lines 0 comments Download
M gyp/utils.gyp View 2 chunks +2 lines, -0 lines 0 comments Download
M include/core/SkOSFile.h View 1 2 3 chunks +14 lines, -2 lines 0 comments Download
M include/core/SkString.h View 1 2 2 chunks +22 lines, -2 lines 0 comments Download
M include/core/SkTDArray.h View 1 chunk +4 lines, -0 lines 0 comments Download
A include/utils/SkRTConf.h View 1 2 1 chunk +135 lines, -0 lines 0 comments Download
M src/core/SkGraphics.cpp View 1 2 3 chunks +9 lines, -0 lines 0 comments Download
M src/core/SkStream.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLProgram.cpp View 1 2 3 chunks +16 lines, -13 lines 0 comments Download
M src/ports/SkOSFile_stdio.cpp View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
A src/utils/SkRTConf.cpp View 1 2 1 chunk +325 lines, -0 lines 0 comments Download

Messages

Total messages: 8
Humper
https://codereview.appspot.com/7098051/diff/1/include/core/SkTDArray.h File include/core/SkTDArray.h (right): https://codereview.appspot.com/7098051/diff/1/include/core/SkTDArray.h#newcode114 include/core/SkTDArray.h:114: } This was handy because sometimes I have a ...
11 years, 5 months ago (2013-01-12 22:13:47 UTC) #1
bsalomon
Rob also ran into the need for a develop vs production build. You guys should ...
11 years, 5 months ago (2013-01-14 14:27:59 UTC) #2
reed1
https://codereview.appspot.com/7098051/diff/1001/include/core/SkStream.h File include/core/SkStream.h (right): https://codereview.appspot.com/7098051/diff/1001/include/core/SkStream.h#newcode379 include/core/SkStream.h:379: Is this different than SkFILEWStream(stderr) ? https://codereview.appspot.com/7098051/diff/1001/include/core/SkString.h File include/core/SkString.h ...
11 years, 5 months ago (2013-01-14 15:00:27 UTC) #3
Humper
https://codereview.appspot.com/7098051/diff/1001/gyp/common.gypi File gyp/common.gypi (right): https://codereview.appspot.com/7098051/diff/1001/gyp/common.gypi#newcode97 gyp/common.gypi:97: 'SK_PRODUCTION=1', On 2013/01/14 14:27:59, bsalomon wrote: > It might ...
11 years, 5 months ago (2013-01-14 15:48:54 UTC) #4
bsalomon
https://codereview.appspot.com/7098051/diff/1001/include/core/SkOSFile.h File include/core/SkOSFile.h (right): https://codereview.appspot.com/7098051/diff/1001/include/core/SkOSFile.h#newcode56 include/core/SkOSFile.h:56: ssize_t sk_getline(char **lineptr, size_t *n, SkFILE *stream); On 2013/01/14 ...
11 years, 5 months ago (2013-01-14 16:02:57 UTC) #5
Humper
On 2013/01/14 16:02:57, bsalomon wrote: > https://codereview.appspot.com/7098051/diff/1001/include/core/SkOSFile.h > File include/core/SkOSFile.h (right): > > https://codereview.appspot.com/7098051/diff/1001/include/core/SkOSFile.h#newcode56 > ...
11 years, 5 months ago (2013-01-14 17:05:42 UTC) #6
Humper
On 2013/01/14 17:05:42, Humper wrote: > On 2013/01/14 16:02:57, bsalomon wrote: > > https://codereview.appspot.com/7098051/diff/1001/include/core/SkOSFile.h > ...
11 years, 5 months ago (2013-01-14 18:12:35 UTC) #7
bsalomon
11 years, 5 months ago (2013-01-14 18:17:05 UTC) #8
On 2013/01/14 18:12:35, Humper wrote:
> On 2013/01/14 17:05:42, Humper wrote:
> > On 2013/01/14 16:02:57, bsalomon wrote:
> > > https://codereview.appspot.com/7098051/diff/1001/include/core/SkOSFile.h
> > > File include/core/SkOSFile.h (right):
> > > 
> > >
> >
>
https://codereview.appspot.com/7098051/diff/1001/include/core/SkOSFile.h#newc...
> > > include/core/SkOSFile.h:56: ssize_t sk_getline(char **lineptr, size_t *n,
> > SkFILE
> > > *stream);
> > > On 2013/01/14 15:48:54, Humper wrote:
> > > > On 2013/01/14 14:27:59, bsalomon wrote:
> > > > > Is ssize_t always defined? I thought it wasn't standard but supported
by
> > > some
> > > > > std libs. Maybe ptrdiff_t?
> > > > 
> > > > ptrdiff_t should work okay -- the getline function that this is built on
> top
> > > of
> > > > returns ssize_t, although I think these types are the same except on
> systems
> > > > like 16 bit windows with large memory model enabled.  Unlikely that
we're
> > > going
> > > > to port skia to that anytime soon, yes?
> > > 
> > > I should think not.
> > > 
> > > https://codereview.appspot.com/7098051/diff/1001/src/utils/SkRTConf.cpp
> > > File src/utils/SkRTConf.cpp (right):
> > > 
> > >
> >
>
https://codereview.appspot.com/7098051/diff/1001/src/utils/SkRTConf.cpp#newco...
> > > src/utils/SkRTConf.cpp:35: char *tmp = (char *) malloc(commentptr-line+1);
> > > On 2013/01/14 15:48:54, Humper wrote:
> > > > On 2013/01/14 14:27:59, bsalomon wrote:
> > > > > sk_malloc (and sk_free)
> > > > 
> > > > will sk_free work with things that are allocated with regular malloc? 
> > > > sk_getline calls the clib getline, which can allocate memory for you and
> > > > obviously isn't using the sk_ versions of things.
> > > 
> > > Hmm... we probably shouldn't mix sk_malloc and free. Maybe this is an
> > exception
> > > where it is OK to call malloc directly.
> > 
> > I rewrote as much as I could to wrap things in sk_malloc, even if it meant
> doing
> > an extra copy, since this isn't performance critical and I hate the idea
that
> > calls like sk_getline() might return something that you can't free with
> sk_free.
> > 
> > Should have another version for you to look at shortly.
> 
> Actually further investigation into the getline mystery reveals that only
> SampleApp on iOS even attempts to compile / link the special SkOSFile_iOS
port,
> and SampleApp doesn't build on iOS for other reasons (it brings in
SkOSFile_iOS
> and SkOSFile_stdio, which creates duplicate symbols), so I'm going to ignore
the
> iOS build issue for now.  
> 
> I was able to build gm on iOS with my CL without any issues.

lgtm
Sign in to reply to this message.

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