WWDC2000 Session 105

Transcript

Kind: captions
Language: en
ladies and gentlemen please welcome the
director of graphics and imaging for Mac
os10 Peter Graff 18yo hi hi everybody
welcome to WWDC my name is Peter Graff
Nino I'm the director of graphics and
imaging at Apple computer and i'll be
talking about some of the technologies
we're putting in Mac OS 10 at the
graphic services layer for all of you
take advantage of basically we're going
to overview a bunch of technologies some
of these are new some of these we're
talking about for the first time here
some of these should be very familiar
and we're gonna have lots of demos we're
going to browse brunner come up on stage
and run us through a whole bunch of
demos for you so let me go to the
architecture slide which you've probably
seen in every presentation so far which
is the basic layer diagram of OS 10 at
the lowest level we have the core
operating system and we have core
services above that application services
layer where most of our technology lives
and then frameworks on top of that I'll
be centering mostly my talk on this area
right here we have a lot of great
technology for you that we've built into
the graphic system in OS 10 based on
industry standards as well as some apple
innovations we have two defor PDF and
postscript we have 3d with opengl we
have apple innovations such as color
sink quartz truetype quicktime you
combine all of that with a
industrial-strength operating system
underneath based on mock and VSD and
some pretty great frameworks above
carbon quartz java and you really have a
great platform for innovation for the
future and we're pretty excited about
all the ideas we have internally and
hopefully you guys will be able to
generate a lot of cool ideas too about
what you can do let me touch on the
graphics block diagram a little
Makka with 10 is a layered system and we
even within our graphic services layer
we have divided into little sub layers
we have at the bottom what we call core
graphics core graphics services which is
the window server that's a central
repository of global information for the
computer the window database those sorts
of things on top of that we have a
variety of drawing frameworks that are
linked into your application we have the
new framework the core graphics 2d
rendering we have quick draw which are
all familiar with from carbon we have
quicktime for media handling and opengl
for 3d so those libraries link into your
applications the core graphic services
server handles the coordination among
all the apps so to give kind of a full
list of all the technologies that i'll
be talking about today with the
exception a quick time at the bottom
there we have courts which is the new
technology the core graphic services
windowing system as well as a 2d
rendering library we have quick-draw
which you're all familiar with from
carbon we have color sync or color
management technology Mac os10 printing
I'll be talking about that opengl for 3d
image capture which is a new framework
you saw demoed invert ron's talk which
is for a 2d still image acquisition and
quicktime which they're a bunch of
sessions on elsewhere in the conference
but I won't be covering here so the
first thing I'm going to talk about is
the core graphic services layer which is
that bottom substrate that kind of sits
below all of the 2d and 3d and media
that happens on the display it's a
client-server windowing system not
unlike display post groups or x windows
if you're familiar with any of those
technologies and its really responsible
for the low-level window system
programming interface the carbon window
manager and the cocoa window object are
on clients of this API and when you make
calls to those in your application
and it turns around and calls the server
to allocate a window destroy a window or
what have you the server is also
responsible for event routing making
sure the event stream gets to the
correct application based on focus and
weather what they're interested in and
also basic real estate management in
terms of getting everyone to share the
display cooperatively some of the key
innovations in the core graphic services
some of this stuff we haven't been able
to talk about before because we're
waiting for the the aqua user interface
to come out who can working on the stuff
for a couple of years the basic idea is
that the window system is really
upgrading its model instead of being a
per pixel switcher which is primarily
what Mac OS or X Windows or other
windowing systems are we've gone for a
model where there's a perfect will mix
from all the windows on the display to
create the the final presentation and
what does this mean well this means that
windows can have a bunch of attributes
that get applied to them on there the
pixels in your window can have
attributes applied on their way to the
display so for example windows have a
full per pixel alpha channel for
transparency there's also layer opacity
so there's an overall fade value on each
window there's a transform an affine
transform mesh warp and color space
conversion for y UV and depth conversion
so a lot of these attributes apply at
mix time to the graphics to create the
display regardless of what drawing
frameworks you're using the
client-server mechanism is in place for
windows system control creation and
deletion moving resizing of windows
drawing however happens through a shared
memory mechanism using anonymous memory
objects in mock to share a read/write
memory between the client and the server
so a quick draw it's just drawing into
standard memory same as core graphics
and the server is able to see that
memory and apply the mix
to the display so when the server since
it's a mixing server needs to repair
part of the display it may need pixels
from your application and pixels from
someone else's application to actually
make up the display so the important
thing to remember is that the drawing
happens in the client so it's fast just
procedure call hitting the memory of the
back buffer and the mixing is in the
server where the complete display is
constructed so i can bring up Ralph now
there is Ralph run or member of the
graphics team we're going to do a little
demo for you of just the basic windowing
facilities on OS 10 we could have the
demo demo machine ok you can see the
display the UI folks have been able to
do a very clean window outline because
we've given them the ability to do the
shadowing so you can see if you bring up
the zoom tool you know kind of a subtle
effect they didn't go overboard but
that's all live content underneath there
the finder we're drawing you would be
seeing those pixels updating underneath
the shadow and so that really gives the
user interface a nice subtle effect and
allows the application use as much of
the real estate as possible so that's
kind of the first thing that the
windowing system has given us you can
also see the inactive title bars or
partially translucent the menus we use
the savings and the opacity so you can
see the window fade out and see if the
window is hanging up there you can move
around behind it
it stays out if you bring up a a shin
document will show you some of the
warping features so here's a text sample
document you go to save that document if
it's dirty or close it and when its
dirty you get a little animation you can
see that alert is translucent as well
now the application has just drawn its
alert to that it doesn't necessarily
know that that window is translucent
that's happening in the mix when it's
presented to the display as is the
animation so windows too small we have
this heat effect and that's done by Z an
animation of a mesh warp on the bits as
they're getting close to the screen so
that's how we do that and the windows
can move together things like that which
make the window a little more
rectangular then we can minify it which
brings in the Genii which is another
application of the mesh warp we create a
nicely sync filtered snapshot of the
actual content of the graphics and then
we run it through the mesh motion path
down to the sound of a dock in the dock
all of the dock content is little
windows including the back translucent
heart there and that's showing off the
scaling as well as the per pixel alpha
that so you can see through the see
through the icon so I think that's about
it for the basic window demo we can go
back to the slides
[Applause]
so now I'm going to cover some of the
drawing components that you can use in
your applications to draw in 2d or 3d or
whatever first and foremost is quick
draw which is the key to the components
Greta of carbon which you're all
familiar with it's the same API and it's
the same code base in fact with just a
few minor changes at the bottom end to
talk to the new windowing system that we
support on Mac OS 9 and Mac OS 10 there
are a few key differences that you need
to be aware of you don't need to be
aware of all of them but you might want
to in certain cases one is there's
automatic buffering support so when you
talk to a Windows grass-court you're not
really talking to the display you're
talking to the shared memory area where
your graphics is being glittered to and
then those graphics are being close to
the display either at wait next event
time or end up date or you can call it
explicitly if you want those graphics to
be flushed to the display so that's one
thing to be aware of if you if you do a
lot of drawings and you it's not showing
up because you haven't hit end update or
gotten another event you might want to
sprinkle a few flushing calls in there
the other thing we're not allowing is
direct access to the screens graph board
there is a full screen API if you want
to do a game so we have that covered but
when the graphical user interface is
running you can see there's a lot of
dynamic ISM going on and we can't allow
applications to draw directly to the
screen we have certain optimizations in
there if for people like quick time and
things like that so there are some
corner cases to that but the window you
know has to be on top opaque not mesh
transformed and all that stuff to
actually allow that case to happen so by
and large it's best just to stay away
from that and let us handle the window
composite all the quick draw drawing is
opaque since the window has a per pixel
alpha channel we had to make a decision
about what kind of pixels out with an
alpha quick draw
and especially one point oh so all
quick-draw content in the windows opaque
the window could still have an overall
fade value on it so you can get
translucent translucency was a quick
draw window but it can't actually draw a
partially opaque pixel you need to be
aware of this in certain cases in 32-bit
mode where we do store the alpha in line
and 16-bit mode we have a separate plane
which quick-draw doesn't see but in
32-bit mode we actually do use the high
byte of the color for the Alpha and that
needs to be set to FF if you're doing
your own bleeding if it's not you might
see holes in your windows occasionally
which is kind of fun but not intended
the other thing should be aware of is in
the printing case the quick-draw
bottlenecks are implemented rather than
by drivers by system software and I'll
get to how they're implemented in a
second but it's a common set of
quick-draw bottlenecks regardless of of
what driver you may be talking to in the
printing case the other 2d rendering
library we have this is a new 2d
rendering library we've talked about for
a few WWD fees now it's called core
graphics 2d rendering part of the core
graphics framework it's the key to D
graphics engine beneath cocoa and also
beneath java or java 2d implementation
is implemented on top of core graphics
it's a PDF postscript imaging model very
industry standard we interpret PDF files
we're based on the PDF 1.2 spec with
some 1.3 features now the major feature
we're missing is the shaded Phil we're
working on that and we'll get that soon
and we'll continue to track the specs as
closely as possible and work with adobe
on future enhancements it's fully
anti-alias very fast scan converter can
convert on the fly and the aliases
texted sub-pixel position on the fly and
it's vector-based for resolution
independent which has always been true
of both script in PDF but this vector
based those words out there now so we
have to remember to apply to older
technology to
the court graphics2d architecture again
is sort of layered and factored out it's
basically a hub architecture where we
have the core graphics API at the core
above that we have the ability to part
PDF files and call the api to draw it we
have a capi that you can call from your
applications quick draw with quick-draw
printing bottlenecks in the printing
case are implemented by calling down to
the core graphics layer then Java 2d as
well is implemented by calling the core
graphics rendering library underneath
which is a different context
implementations we currently have
obviously we have an on screen rendering
context we have a PDF file creation
context we have a postscript file
creation context and raster data context
for printing in the printing case what
happens is if your ring from a carbon
app going through quick draw your
graphics come in through a quick draw
get recorded in the first pass when we
generate the spool file through the core
graphics rendering library and out that
PDF arrow they're sent to the back end
of the printing system the back end of
the printing system it comes back in the
top through PDF depending upon what kind
of printer it ended up at you get either
postscript or raster data or I'm sure
third parties will do their own PDF
renderers as well to plug in to into
that architecture but standardizing on
PDF as that back into the printing
system I think will be a big advantage
for us so the core graphics 2d rendering
library really leverages and is
leveraged by a bunch of Apple
technologies I talked about cocoa and
Java 2d but also internally we rely on
other pieces of Apple technology
tried-and-true technologies like color
sync apple type services these are
mature technology has been an apple for
a while and we're able to just leverage
those to do our PDF core graphics
rendering so that's really great on the
other side in addition to cocoa and java
2d appearance manager is using court
ethics to draw the text if you'll notice
it's anti alias and has a slight blur
drop shadow effect added to it and so
that's going through the core graphics
API so you can draw a parent's manager
text and it's actually calling core
graphics quick time we've worked with a
QuickTime team on a PDF graphics
importer this allows a PDF to be handled
by quicktime graphics importer
architecture so if you're using
QuickTime graphics importer you'll get
PDF if you hook it up to do drag and
drop or import or whatever in your
application in fact we have a demo of
that and go back to the demo machine
we're going to show you this is a
version of apple work that's in
development it's an update that will
hopefully be coming out soon running
under OS 10 here this is actually a CFM
applications and all its glory and what
we're going to do is ralph's created a
little word processing document type in
some text and now he's going to
directory full of PDF he's going to drag
it over the Apple works guys have hooked
up the graphics import capability to ask
quick time if it can handle the file so
you could do the same thing with tiff or
or whatever but now with on OS 10 with
our PDF support you just get that for
free so that's that's pretty cool I
think that's you know a great if you're
not using graphics importers now and you
have an application like this but can
embed graphics definitely start looking
at that so you see on resize the codec
gets called to rerender the data is
fully vectors andrey anti-alias and
everything so that's pretty cool
so back to the slides so if you want to
take a little deeper and not just do the
core graphics or the graphics importer
with with with QuickTime but you
actually want to call the api there's
going to be a detailed session on friday
about the 2d drawing api derek leg is
going to give a pretty detailed overview
of it i'll just give you a few bullets
here it's a sea-based api very
straightforward virtually one-to-one
with PDF postscript imaging model the
naming convention we use for the
functions is similar to core foundation
if you were any of those talks so for
example to draw the current path to fill
the current pap BCG context drop half be
pets with the context and then an
enumeration that says you want to fill
you can also say stroke or stroke and
fill very straightforward there's
abstraction for transformations color
spaces images path kind of all the
objects you would expect in the PDF and
postscript imaging model so to give you
a demo a short demo of that you're also
going to see this at dereks sessions but
if we can get back to the demo machine
we have a little application here we
call carbon draw one of our engineers
Mike marinovich had this as a little
quick draw example and it's basically a
little drawing canvas that you can
create simple line art and just shows
how to build a basic application what
Mike did was he had he had already kind
of factored out his code he had one
module which basically did all of the
all of the content rendering there and
he replaced that with a module when I
was ten but called core graphics and so
any also prettied up the user interface
a little bit to bring out some of the
features of OS pen and core graphics
well here's the carbon color picker
which is looking pretty good these days
the crayons are my favorite kind of got
that aqua look going we have the full
postscript line style implementation as
you'd expect so you can change the end
cap round in tap
you can see if you create it in the lip
we can show you that and Mike actually
think that totally done converting you
can see when he rubber bands it's
actually quick-draw doing the rubber
banding and then he says core graphics
to draw the content but it's kind of
halfway through converting it but it's a
nice thing to show that you can kind of
live in both worlds there so we have the
dashed implementation we've got one
particular dash setting you can change
the joins in the dashes and you know so
kind of fun so we're going to make this
available sometime thanks sometime after
ww see the one thing the app doesn't do
yet which we want to show how to do is
print that out to show how to get from
the quick quick draw grass-court through
the core graphics context when you're
printing so you can replay the same
objects in the printing test so that's
it for that if you want to see more of
that I think they're going to show
actual code snippets of that as well as
a session on friday so printing printing
for OS 10 is a completely new
architecture it's a client-server
architecture of the clean separation
between the front end of the printing
process and the back end and they
communicate via the PDF school file and
a job ticket mechanism which is an XML
file that basically describes the
finishing options on the file whether
it's thought to be n up or a certain
paper tray or a certain color correction
strategy or whatever it simplifies the
driver model a lot for those of you
who've written printer drivers on OS 9
you know from the quick-draw bottle next
to the paper in the printer is basically
your deal if you want to do schooling
background printing queue management
whatever you know you've got to write a
ton of code to get that son we're taking
care of all of that in OS 10 and if
you're bringing up a new printer you
really just have to write the engine
control logic sacrament for the i/o code
we have four USB you can probably reuse
another I Oh technique and you know a
little bit of you I to bring out your
printer specific features but that's
really about it again PDF is a default
school file format that brings us a lot
of advantages
in the sense that we can do print
preview for free you can also debug your
printing code pretty quickly by just
looking at the PDF output rather than
wasting paper and it also leverages core
graphics to the 2d rip the rendering
library as a rip which we spent a lot of
time optimizing and the printer
developers can take advantage of that
out of the box and get some pretty high
performance rendering so demos of
printing are never very exciting so
we're going to demo print preview I
shouldn't say that totally but we don't
have been around stage but this again is
Apple work so Ralph created a little
spreadsheet here for his wild creature
collection we're going to exercise the
PDF graphic and quarter a little bit and
drag in a couple of files so this is the
raster to resize it down this is the
ferocious chicken
so it's getting the you know the vector
resizing now you know spreadsheet
typically something that's difficult to
share and let the other person has the
application you don't always want to
send them the original file so you know
exchanging a PDF is kind of a good way
to do that so one way you can do that on
though it's 10 to bring up print and hit
the preview button so all the quick draw
calls are going to get translated to PDF
and we're going to open up our little
PDF viewer and we solve a couple bugs
with the black there but ignore that for
now so if you basically we've got a nice
PDF file in in preview out of quick draw
so and that's just 0 pin thanks there's
more if you bring up mail van you want
it to mail that to someone CC someone
else someone else okay about something
you can you can actually just drag out
of that title bar proxy there and then
I'll image right in line you can send
that if someone's not running OS 10
that'll just show up as a peep as a PDF
attachment to launch an acrobat and
looks just like that in print so as I
said before you know not just for users
but for developers when you're debugging
your printing code you're trying to
figure out how to let lay out your
graphic so you don't have like hanging
words off one page to the next you can
iterate in that preview loop to get your
pages to lay out correctly before you
know you have to get it all the way to
the printer so that's a good way to
debug printing code for developers to
okay back to the slide
image capture image capture is a new
framework that will be talking about at
wwc tomorrow it's an API and some system
services for digital still cameras we're
focusing primarily on cameras right now
is the architecture is flexible enough
to handle scanners and other devices as
well we're going to be building in
support for the new USB still camera
protocol called PPP which is coming out
soon I'm told cameras this summer will
by and large be shipping with that
protocol there's a bunch of cameras out
there already we have drivers for some
and we'll get drivers for more by
working with the vendors but writing a
driver for this architecture is actually
very straightforward the API will be
available on both mac OS 9 and mac OS 10
and we're also providing a simple user
experience we're downloading the photos
so when the hot plug event comes into
the computer will be a control panel
that will come up and allow the users to
say what they want to do with their
image most likely just download them or
whatever will be showing that I think
they're going to be some good demos
tomorrow at this session too so if
you're interested in that stuff please
attend another piece of technology you
definitely should be aware of is OpenGL
OpenGL is the only 3d graphics API we
supported on mac OS 10 so things like
rave and and quick drop 3d are not being
brought forward to OS 10 focusing all of
our energy on OpenGL right now we're at
the 1.1 spec level we have a bunch of
extensions all of the interesting
extensions that the game developers have
been asking for and will continue to
track as more extension to come out and
more hard work comes out with those
extensions and hardware we will track
those as quickly as possible and then
OpenGL 1.2 is also on the horizon as
well it's a fully accelerated on rage
128 based systems that's in BP for in
what you have that all of the max you
can currently by except for the ibook
support for earlier draw at earlier
hardware gives in software right now so
you
definitely write your app the software
renderer is actually pretty good we are
working at support for rage pro and some
of the early earlier accelerators as
well we're juggling that with support
for a new hardware that's coming which
though is easier to get engineers we're
kind of new stuff the old stuff so
hopefully we'll be able to get it all
done but just to let you know we're
probably gonna be prioritizing need of
hardware before going back to the old
stuff just to put that out there but
it's not my call so give us feedback one
of the things we've done in the OpenGL
implementation since it was being
brought up at the same time as the i/o
kit and all of that stuff happening
together we have pretty advanced
resource allocation hardware abstraction
layer inside the colonel this layer is
able to quickly manage texture paging
and buffer paging on and off the card in
a very optimized format and we've been
able to do things like play quake
reasonably with to megas texture memory
launched many applications which
saturates the texture memory and you get
a very smooth slow down as you need load
more and more textures it's really just
the cost of that extra command to load
the texture it's very smooth degradation
because we think over time more and more
applications are going to be taking
advantage of this and we really want to
optimize not just for games but for a
world where say every application is is
using afridi pipe
okay so I have to apologize first this
part of the demo you are going to see a
command line so if that bothers you hold
your eyes I apologize as my program this
is little program I wrote called them
slide and it talks to OpenGL talks a
quick time to load a bunch of JPEGs
these are some JPEGs I took at the
office I took my own advice use graphics
employers wasn't that hard six hundred
lines of code and you can see what I've
done is just put the textures on little
planes and kind of moving the back and
forth so it kind of looks like a 2d app
so these are all my friends at work but
this to show you it's 3d little mouse
handling in there so Ralph can move back
on the camera and then ease it off to
the side and awkward but you can see
what's happening as those planes are
just kind of moving along an axis in and
out of the camera with the using the
detector blending functions and so you
get kind of a nice a nice effect
there's ralphs modeling tool for the
water demo I know if you saw that go by
maybe now with Maya we can get you some
better better modeling cool so I took my
own advice and use graphic importers I
said well we've got this other directory
full of PDF maybe I should try to run my
same program on those pdfs i honestly
did this you know I realized after the
fact that said wait that five demo I'm
working on I could use that with PDF and
a few days ago I tried it and it
actually worked you see things were
missing there in PDF but there they are
so these are all those texture files
loaded up on PDF from PDFs provide that
as a texture to the 3d engine so this is
actually something that in the next demo
will show two shows a way to use core
graphics and 3d together because we
think with the core graphics 2d
rendering library you can do pretty nice
dynamic alpha textures if you have a
game that you want to do you I or you
just want to do some nice 2d rendering
two venues as a texture we think the
combination of those two things will be
pretty useful
so that's that bring go back supplies
for just one sec Thanks the next demo is
a 3d compositor you saw this in the
keynote Ralph is responsible for it so
thank him and he's was responsible for
the compositor you saw last year too and
it just added more features the the
basic idea was here originally we wrote
the app as the demo of you know what can
you do with PDF and compositing and
anti-aliasing and actually the engine
that drives this application is the same
thing that's running the whole windowing
system when we first showed the
application we couldn't really talk
about that but the layer composite
engine here is actually running the
whole display and so what we thought
would be fun is good you know maybe I
don't know if you have like a packaging
application or something again there's a
way with the PDF built into the system
you know maybe maybe there's a nice
application idea here to do to do some
kind of simulation like that and you can
get pretty high performance you can drag
around the PDF take advantage of the
high performance 2d you can resize it
rotate it and it's just getting texture
maps or else can also move around the
lights to move those hit he didn't show
all the features on stage
so that's that little thing there is the
light whipping around that can animate
so anyway I mean this was something
literally you know we put together in
the last week or so you know to try to
show off a little bit of OSN and all the
work we've been doing but you know you
guys have a whole year till next year to
impress us with what you can do with all
this technology so just to kind of wet
your appetite there okay I think that
that's it for that ok the next thing
we're going to talk about is performance
cool now it's pretty important in this
new world where you don't always see
what's going on if your application is
drawing that you take some time to
optimize because you can find that
you'll be drawing things a lot of times
in the back buffer that aren't
necessarily being being shown we may be
drawing the same thing over and over
again you may be flushing too much
there's it's really important to try to
tune that and we've gone through you
know inside of apple on a lot of
iterations with all the other teams to
try to get to improve performance and
some of the tools we develop in-house
we're going to be making available
they're not fully supported in in DP for
the windowing system has the debugging
hooks but we don't have a tool turn them
on so it's just a question of giving you
a small app that can turn on some of
these debugging hooks but Ralph is going
to bring you through some of the some of
the performance tools and hopefully if
there any of our colleagues at Apple
whose apps we're going to show here and
embarrass we apologize in advance we'll
help you help you tune your code later
ok back to Ralph okay go ahead ok and
what I'm going to show is this little
application called quarks debug and what
it does is whenever an application
flushes the content of the backing store
onto the screen it flashes that area
briefly in yellow so you see what what's
getting drawn so for example if you move
over the docs if it's done a lot of
drawing you see it flickers like madly
so how do you use that so for example I
take dem application called sketch and I
draw a circle which has reasonable
performance but when I turn on the ruler
I notice that performance is suddenly
very bad so it's that little tool but
this setting does it's flashes yellow
wait for a few milliseconds and then
does the actual drawing so that you can
see more and more clearly what's going
on so you see this application actually
redraws quite a bit of the rulers every
Mouse update and that's the reason why
it's so slow and what's that rectangle
like in the upper left which one I don't
know the big yellow one that goes in the
upper left of the content i'm not sure
why that needs to be done I don't know
obviously there's some pixel touched in
the upper left corner okay so the
message here is whenever you have an
event loop try to flush exactly once per
mouse move mouse click or whatever the
event if you're responding to and that
is two reasons one it just looks better
which is the the end user just sees one
single update and everything is just
there and the second thing is that
memory bandwidth from the to the backing
store is about six times high around our
current machines than it is to the frame
buffer so flushing less actually helps a
lot performance okay let's let me quit
this one and another application i'm
going to show is sean paul you and i
clicked in another switch up there which
is all the flash drawing so now I not
only marking every time this application
/ I actually mark every time a single
primitive is strong so it's similar to
seeing drawing directly on screen and
you see it now redrawing the
I can bar at the top of the window with
pauses that's not that flow in the back
yeah that is a limit delay in there that
you actually see what's going on okay
and what this application does when a
type a character you see it's actually
redrawing the scrollbar several time
every time a type of character so that's
a good point to start of the man
optimizing and sometimes you have an
application and it does not perfectly
efficient drawing but you still get away
with it because you have a lot of CPU
power well you should try to remove
those performance bottlenecks anyway
because when the applicant and the
computer is under heavy load like there
are other applications are running then
this stuff can actually cause additional
paging because you execute code which
doesn't need to be executed so it is
vital I would like to advise people to
actually use that tool and basically
only draw whatever has changed and keep
everything else okay okay thank well
wait a second oh wait we haven't hung
out you can also get a list from the
windows server which are listed all
windows that have been allocated so it's
probably bit hard to see up here but
every line represents a window and you
see which application has allocated it
so for example yes sham porno here have
one window which is about 600 x 500
pixels which is main document window and
another window which is a thousand by 22
pixels which is the menu bar so all of
these members these windows require
additional memory because there is a
backing store there that catches a bit
and essentially if a window is
off-screen it is a good idea to release
it otherwise you're just spending
something like a few hundred K of memory
just for that window and it's usually
faster to redraw a window when you need
it again then swapping it in from there
so as a typical example here we have
login window here which was launched
before yesterday entire show he started
and actually login window has its window
allocated somewhere it's just off screen
so these here are something like 300 k
which could have been saved okay great
some great tips there will be getting
you some some of that some of those
tools like the courts debug as soon as
soon as we can after your DP for here
actually that one's pretty easy because
it is really just that app and its
assets a few a few bits in the window
server so future directions so as we
move forward one of the things that's
kind of notices there hasn't been a huge
change of story in terms of the
technologies we're working on in terms
of 2d 3d we've made the OpenGL decision
over a year ago media with QuickTime
obviously so we're pretty pleased with
the core set of technologies we've
picked to focus on and we think that
those bets are really going to pay off
what we're doing now is a couple of
things we're continuing in each
technology area to obviously advance
advance the state of the art there for
example in core graphics and the 2d
rendering we're looking at things like
Raptor effects model if you've seen the
SVG spec there's a pretty sophisticated
Raptor effects model in there more
extensions for transparency and blending
modes and things like that to really
upgrade the 2d graphics to be able to do
a lot of the capabilities on the fly to
render like the whole button instead of
just the label text and things like that
and to do that you need a lot of power a
lot of filtering operations and things
like that so we really see 2d kind of
going towards that expressive
expressiveness almost a blend of image
processing and 2d it's kind of the
direction that core graphics is going to
go in the other thing that we're really
working on is continuing to look for
opportunities to
great all this technology together
better and a prime example of that is
OpenGL in the windowing system we didn't
show you back in the back in the demo
but you can actually drag a like
translucent icon over the 3d content and
it all gets mixed in following the
mixing metaphor that we've set up for
the desktop now of course what we have
to do to achieve that you don't want to
hear about but it actually works and
there is some loss and frame rate but
the user experience it just feels like
any other window over time we want to be
able to do those things much more
efficiently and hardware take advantage
of OpenGL within the windowing system
itself and to fully accelerate the whole
desktop and make a great experience so
that's another key integration area that
that we're looking at as well
so the summary here we if you're if
you're doing a carbon application
there's a couple of simple things you
can do you can definitely take a look at
these performance tools and see if
there's too much flushing going on or
flushing you don't understand a lot of
times it's not necessarily your code if
you're using power plan or something
like that the updates may be coming from
there so kind of chasing down through
the layers making sure that the
buffering is as efficient as possible
and of course using QuickTime graphic
importers if your application needs to
import any graphical images it's a great
way to do that and you'll get to repeat
the free feature of the PDF graphics
importer on OS 10 also if you're
interested in Mac OS 10 only
opportunities I think there's a real
fertile ground here for applications you
consider by the time we ship one point o
the average system running OS 10 if you
will is going to be a pretty high
performance high performance machine g4s
or high clock rate g3's good graphic
systems you can really target a much
much higher functionality set you know
even for us on OS 10 we do live window
drag because you know we're kind of
starting starting from scratch here on
OS you know an OS 9 where you won't need
to go back to the previous previous
architectures maybe that that's not
always possible they probably do it i
know it's 92 but just an example of
trade-offs where if you know you're
going to be hitting a certain
performance level why not take advantage
of it there's some benefits for say the
smaller market of OS 10 you can turn
that around to an opportunity to really
take advantage of the hardware to its
fullest the other thing is the
technology combination or the palette of
technologies we're offering on OS 10 is
really kind of the unique combination in
the industry I think you know if you
look at VSD you know the kind of the
plumbing and the standard UNIX
facilities they're up to the stuff we're
doing with the windowing system and the
courts api's opengl coco quicktime we
kind of mix all that stuff up together
and you know you've got some pretty
interesting opportunities to do some
pretty end of
so if you're looking for OS 10
opportunities I would say go for it and
hopefully next year at this conference
will all be surprised by the demos you
guys give which would be great so I do
have some roadmap slides here to point
you at some additional sessions then I
think we're going to have time for some
Q&A after that today there's one more
session this afternoon in room C which
is the font management session if you
want to learn how to how to manage off
on OS 10 since there between the sports
management away from the resource
manager you need to hear about that on
Thursday there are some sessions on
OpenGL in the morning there's beyond
game session that Jeff stall is doing to
show some of the other ideas for how you
can use a OpenGL in not just greedy and
game there's an OpenGL advanced
optimization section a session which
talks about some of the extensions that
we're working on and some of the
optimization techniques like compiled
vertex rays and other things if you
really want to make your frames goes
that's as possible there is certain code
paths through OpenGL that you need to be
aware of if you're really trying to get
as much as many triangles through as
possible there's an OpenGL feedback
forum tomorrow as well so you can meet
the team give them some feedback and
tomorrow of course is the image capture
session also which will be across the
street in the Civic Center to learn
about the image capture framework and
see some demos of that and then Friday
we have a pretty full slate for you
starting at nine the color sync session
the Mac os10 printing session there to
printing sessions introductory and
advanced there's a session on the courts
api's which will be in hall to in here
at two and then finally the last event
of the conference which you're all going
to hang up for is the graphics and
printing feedback session and so we'll
all be there and that you can meet the
team and give us additional feedback so
with that one more slide who to contact
on the DTF side
it developer relations as far as our
developer partnership folks John Cigna
who is the technology manager for mac OS
core OS and graphic services Sergio melo
whose recent recently joined the apple
team is a 3d technology manager their
email addresses are there and there's a
feedback address at apple com for
graphic feedback as well you can send
stuff there okay I'd like to invite a
few members of the team who might be
around and John back on stage to bring
up the house lights maybe do a few Q&A