<s>
Direct2D	B-Library
is	O
a	O
2D	O
vector	O
graphics	O
application	B-Application
programming	I-Application
interface	I-Application
(	O
API	B-Application
)	O
designed	O
by	O
Microsoft	O
and	O
implemented	O
in	O
Windows	B-Operating_System
10	I-Operating_System
,	O
Windows	B-Application
8	I-Application
,	O
Windows	B-Device
7	I-Device
and	O
Windows	B-Device
Server	I-Device
2008	I-Device
R2	I-Device
,	O
and	O
also	O
Windows	B-Application
Vista	I-Application
and	O
Windows	B-Device
Server	I-Device
2008	I-Device
(	O
with	O
Platform	O
Update	O
installed	O
)	O
.	O
</s>
<s>
Direct2D	B-Library
takes	O
advantage	O
of	O
hardware	O
acceleration	O
via	O
the	O
graphics	B-Architecture
processing	I-Architecture
unit	I-Architecture
(	O
GPU	B-Architecture
)	O
found	O
in	O
compatible	O
graphics	B-Device
cards	I-Device
within	O
personal	O
computer	O
,	O
tablet	O
,	O
smartphone	O
and	O
modern	O
graphical	O
device	O
.	O
</s>
<s>
It	O
offers	O
high	O
visual	O
quality	O
and	O
fast	O
rendering	O
performance	O
while	O
maintaining	O
full	O
interoperability	O
with	O
classic	O
Win32	O
graphics	O
APIs	B-Application
such	O
as	O
GDI/GDI	O
+	O
and	O
modern	O
graphics	O
APIs	B-Application
such	O
as	O
Direct3D	B-Application
.	O
</s>
<s>
Direct2D	B-Library
is	O
a	O
native	B-Language
code	I-Language
API	B-Application
based	O
on	O
C++	B-Language
that	O
can	O
be	O
called	O
by	O
managed	O
code	O
and	O
uses	O
a	O
"	O
lightweight	O
COM	B-Application
"	O
approach	O
just	O
like	O
Direct3D	B-Application
,	O
with	O
minimal	O
amount	O
of	O
abstraction	O
.	O
</s>
<s>
However	O
,	O
unlike	O
WPF	B-Device
and	O
similarly	O
to	O
GDI/GDI	O
+	O
,	O
Direct2D	B-Library
is	O
an	O
"	O
immediate	O
mode	O
"	O
rendering	O
API	B-Application
with	O
simple	O
BeginDraw/Draw/EndDraw	O
calls	O
;	O
Direct2D	B-Library
has	O
no	O
concept	O
of	O
a	O
"	O
scene	O
"	O
and	O
does	O
not	O
use	O
retained	O
tree	O
structures	O
,	O
and	O
the	O
rendering	O
state	O
is	O
preserved	O
between	O
drawing	O
calls	O
.	O
</s>
<s>
Direct2D	B-Library
can	O
minimize	O
CPU	O
usage	O
and	O
utilize	O
hardware	O
rendering	O
on	O
a	O
graphics	B-Device
card	I-Device
with	O
minimum	O
support	O
of	O
Direct3D	B-Application
Feature	O
Level	O
9	O
with	O
WDDM	O
1.1	O
drivers	O
.	O
</s>
<s>
Applications	O
can	O
choose	O
to	O
use	O
it	O
exclusively	O
with	O
CPU	O
,	O
the	O
so-called	O
software	O
rendering	O
by	O
using	O
it	O
in	O
conjunction	O
with	O
WARP10	O
in	O
situations	O
when	O
hardware	O
capability	O
is	O
not	O
available	O
,	O
such	O
as	O
when	O
running	O
within	O
a	O
device	O
with	O
minimal	O
GPU	B-Architecture
support	O
,	O
under	O
terminal	B-Protocol
service	I-Protocol
,	O
Windows	O
session	O
0	O
,	O
or	O
when	O
graphics	O
rendering	O
is	O
performed	O
in	O
a	O
remote	O
server	O
with	O
the	O
graphical	O
result	O
sent	O
back	O
to	O
the	O
client	O
device	O
.	O
</s>
<s>
Direct2D	B-Library
performance	O
and	O
memory	O
usage	O
scale	O
linearly	O
with	O
primitive	O
counts	O
in	O
both	O
software	O
and	O
hardware	O
.	O
</s>
<s>
Direct2D	B-Library
supports	O
high-quality	O
rendering	O
with	O
the	O
following	O
key	O
features	O
:	O
</s>
<s>
Direct2D	B-Library
allows	O
full	O
interoperability	O
with	O
GDI	B-Operating_System
,	O
GDI+	O
,	O
and	O
permits	O
rendering	O
to	O
and	O
from	O
a	O
Direct3D	B-Application
surface	O
,	O
as	O
well	O
as	O
to	O
and	O
from	O
a	O
GDI/GDI	O
+	O
device	O
context	O
(	O
HDC	O
)	O
.	O
</s>
<s>
Such	O
interoperability	O
allows	O
developers	O
to	O
gradually	O
replace	O
critical	O
code	O
paths	O
with	O
Direct2D	B-Library
code	O
without	O
the	O
need	O
to	O
overhaul	O
their	O
entire	O
source	O
code	O
.	O
</s>
<s>
In	O
Windows	B-Operating_System
10	I-Operating_System
timeframe	O
,	O
an	O
Open	O
Source	O
project	O
called	O
Win2D	B-Library
was	O
developed	O
by	O
Microsoft	O
to	O
further	O
simplify	O
the	O
usage	O
of	O
Direct2D	B-Library
and	O
DirectWrite	O
in	O
Universal	B-Device
Windows	I-Device
Platform	I-Device
(	O
UWP	O
)	O
application	O
.	O
</s>
<s>
Win2D	B-Library
is	O
a	O
highly-efficient	O
WinRT	O
wrapper	O
of	O
Direct2D	B-Library
and	O
DirectWrite	O
designed	O
from	O
the	O
ground	O
up	O
to	O
integrate	O
seamlessly	O
with	O
XAML	B-Device
Canvas	O
control	O
while	O
preserving	O
the	O
power	O
of	O
the	O
underlying	O
graphics	O
subsystem	O
.	O
</s>
<s>
An	O
updated	O
version	O
of	O
Direct2D	B-Library
was	O
launched	O
with	O
Windows	B-Application
8	I-Application
in	O
October	O
2012	O
.	O
</s>
<s>
It	O
was	O
also	O
backported	O
to	O
Windows	B-Device
7	I-Device
SP1	O
(	O
but	O
not	O
to	O
Windows	B-Application
Vista	I-Application
)	O
via	O
the	O
Windows	B-Device
7	I-Device
platform	O
update	O
.	O
</s>
<s>
The	O
original	O
version	O
of	O
Direct2D	B-Library
was	O
tied	O
to	O
DirectX	B-Application
11	O
(	O
in	O
hardware	O
,	O
up	O
to	O
Direct3D	B-Application
10.1	O
is	O
used	O
)	O
,	O
whereas	O
this	O
version	O
of	O
Direct2D	B-Library
integrates	O
with	O
DirectX	B-Application
11.1	O
.	O
</s>
<s>
Windows	B-Application
8	I-Application
also	O
added	O
interoperability	O
between	O
XAML	B-Device
and	O
Direct2D	B-Library
along	O
with	O
Direct3D	B-Application
components	O
,	O
which	O
can	O
be	O
all	O
mixed	O
in	O
an	O
application	O
.	O
</s>
<s>
New	O
features	O
were	O
added	O
to	O
Direct2D	B-Library
with	O
Windows	B-Device
8.1	I-Device
in	O
October	O
2013	O
:	O
Geometry	O
realizations	O
,	O
Direct2D	B-Library
effects	O
API	B-Application
,	O
command	O
list	O
API	B-Application
,	O
multithreading	O
APIs	B-Application
,	O
per-device	O
rendering	O
priority	O
,	O
support	O
for	O
JPEG	O
YCbCr	O
images	O
for	O
smaller	O
memory	O
footprint	O
,	O
and	O
support	O
for	O
block	O
compressed	O
formats	O
(	O
DDS	O
files	O
)	O
.	O
</s>
<s>
The	O
release	O
of	O
Windows	B-Operating_System
10	I-Operating_System
in	O
July	O
2015	O
brought	O
important	O
updates	O
and	O
new	O
features	O
to	O
Direct2D	B-Library
such	O
as	O
the	O
performance	O
improvement	O
of	O
rendering	O
scalable	O
text	O
without	O
font	O
rasterization	O
,	O
the	O
ability	O
to	O
download	O
the	O
needed	O
font	O
from	O
the	O
cloud	O
on	O
demand	O
without	O
requiring	O
the	O
font	O
installation	O
step	O
,	O
an	O
optimization	O
for	O
faster	O
image	O
loading	O
and	O
image	O
effect	O
rendering	O
,	O
and	O
a	O
more	O
sophisticated	O
way	O
to	O
apply	O
gradient	O
brush	O
through	O
the	O
use	O
of	O
2D	O
mesh	O
made	O
of	O
gradient	O
patches	O
.	O
</s>
<s>
This	O
release	O
also	O
introduced	O
a	O
brand-new	O
API	B-Application
extension	O
to	O
support	O
digital	O
ink	O
,	O
which	O
is	O
highly	O
leveraged	O
by	O
the	O
Microsoft	B-Application
Edge	I-Application
browser	I-Application
as	O
well	O
as	O
the	O
ink	O
canvas	O
XAML	B-Device
control	O
.	O
</s>
<s>
In	O
their	O
2012	O
paper	O
on	O
the	O
competing	O
NV	O
path	O
rendering	O
OpenGL	O
extension	O
,	O
Mark	O
Kilgard	O
and	O
Jeff	O
Bolz	O
explain	O
(	O
and	O
criticize	O
)	O
the	O
internals	O
of	O
Direct2D	B-Library
as	O
follows	O
:	O
"	O
Direct2D	B-Library
operates	O
by	O
transforming	O
paths	O
on	O
the	O
CPU	O
and	O
then	O
performing	O
a	O
constrained	O
trapezoidal	O
tessellation	B-Algorithm
of	O
each	O
path	O
.	O
</s>
<s>
These	O
trapezoids	O
and	O
shaded	O
geometry	O
are	O
then	O
rasterized	O
by	O
the	O
GPU	B-Architecture
.	O
</s>
<s>
The	O
resulting	O
performance	O
is	O
generally	O
better	O
than	O
entirely	O
CPU-based	O
approaches	O
and	O
requires	O
no	O
ancillary	O
storage	O
for	O
multisample	O
or	O
stencil	O
state	O
;	O
Direct2D	B-Library
renders	O
directly	O
into	O
an	O
aliased	O
framebuffer	O
with	O
properly	O
antialiased	O
results	O
.	O
</s>
<s>
Direct2D	B-Library
’s	O
primary	O
disadvantage	O
is	O
 [ that ] 	O
the	O
ultimate	O
performance	O
is	O
determined	O
not	O
by	O
the	O
GPU	B-Architecture
(	O
doing	O
fairly	O
trivial	O
rasterization	O
)	O
but	O
rather	O
by	O
the	O
CPU	O
performing	O
the	O
transformation	O
and	O
trapezoidal	O
tessellation	B-Algorithm
of	O
each	O
path	O
and	O
Direct3D	B-Application
validation	O
work.	O
"	O
</s>
<s>
In	O
July	O
2012	O
,	O
the	O
Windows	B-Application
8	I-Application
team	O
posted	O
the	O
following	O
on	O
the	O
blog	O
of	O
Steven	O
Sinofsky	O
:	O
"	O
To	O
improve	O
geometry	O
rendering	O
performance	O
in	O
Windows	B-Application
8	I-Application
,	O
we	O
focused	O
on	O
reducing	O
the	O
CPU	O
cost	O
associated	O
with	O
tessellation	B-Algorithm
in	O
two	O
ways	O
.	O
</s>
<s>
First	O
,	O
we	O
optimized	O
our	O
implementation	O
of	O
tessellation	B-Algorithm
when	O
rendering	O
simple	O
geometries	O
like	O
rectangles	O
,	O
lines	O
,	O
rounded	O
rectangles	O
,	O
and	O
ellipses.	O
"	O
</s>
<s>
TIR	O
enables	O
Direct2D	B-Library
to	O
spend	O
fewer	O
CPU	O
cycles	O
on	O
tessellation	B-Algorithm
,	O
so	O
it	O
can	O
give	O
drawing	O
instructions	O
to	O
the	O
GPU	B-Architecture
more	O
quickly	O
and	O
efficiently	O
,	O
without	O
sacrificing	O
visual	O
quality	O
.	O
</s>
<s>
TIR	O
is	O
available	O
in	O
new	O
GPU	B-Architecture
hardware	O
designed	O
for	O
Windows	B-Application
8	I-Application
that	O
supports	O
DirectX	B-Application
11.1.	O
"	O
</s>
<s>
This	O
was	O
followed	O
by	O
a	O
benchmark	O
using	O
some	O
15	O
SVGs	B-Application
,	O
claiming	O
performance	O
improvements	O
in	O
the	O
range	O
of	O
151%	O
to	O
523%	O
.	O
</s>
<s>
DirectX	B-Application
11.1	O
hardware	O
is	O
already	O
on	O
the	O
market	O
today	O
and	O
we	O
’re	O
working	O
with	O
our	O
partners	O
to	O
make	O
sure	O
more	O
TIR-capable	O
products	O
will	O
be	O
broadly	O
available.	O
"	O
</s>
<s>
The	O
TIR	O
feature	O
was	O
among	O
those	O
that	O
caused	O
a	O
"	O
war	O
of	O
words	O
"	O
between	O
Nvidia	O
and	O
AMD	O
around	O
December	O
2012	O
,	O
because	O
Nvidia	O
's	O
Kepler	B-General_Concept
GPU	I-General_Concept
family	I-General_Concept
does	O
not	O
support	O
it	O
,	O
whereas	O
AMD	O
's	O
GCN	B-Architecture
does	O
.	O
</s>
<s>
In	O
Windows	B-Device
8.1	I-Device
,	O
Direct2D	B-Library
can	O
use	O
the	O
Direct3D11	O
hardware	O
tesselators	O
,	O
but	O
only	O
in	O
conjunction	O
with	O
D2D1_FILL_MODE_ALTERNATE	O
.	O
</s>
<s>
D2D1_FILL_MODE_WINDING	O
)	O
then	O
Direct2D	B-Library
falls	O
back	O
to	O
tessellation	B-Algorithm
on	O
the	O
CPU	O
,	O
but	O
still	O
uses	O
TIR	O
for	O
anti-aliasing	O
(	O
if	O
TIR	O
is	O
available	O
)	O
.	O
</s>
<s>
Since	O
hardware	O
tessellation	B-Algorithm
is	O
available	O
in	O
base	O
Direct3D11	O
(	O
not	O
necessarily	O
11.1	O
)	O
,	O
Microsoft	O
claimed	O
significant	O
performance	O
improvements	O
with	O
Direct2D	B-Library
in	O
Windows	B-Device
8.1	I-Device
(	O
vs	O
.	O
Windows	B-Application
8	I-Application
)	O
on	O
non-TIR	O
hardware	O
.	O
</s>
<s>
Internet	B-Application
Explorer	I-Application
9	I-Application
and	O
later	O
versions	O
use	O
Direct2D	B-Library
and	O
DirectWrite	O
for	O
improved	O
performance	O
and	O
visual	O
quality	O
.	O
</s>
<s>
Direct2D	B-Library
support	O
was	O
added	O
in	O
the	O
alpha	O
version	O
of	O
Firefox	B-Application
3.7	O
,	O
roughly	O
doubling	O
its	O
rendering	O
speed	O
.	O
</s>
<s>
(	O
Firefox	B-Application
4	O
also	O
added	O
DirectWrite	O
support	O
,	O
but	O
this	O
was	O
made	O
non-default	O
for	O
some	O
fonts	O
in	O
Firefox	B-Application
7	O
due	O
to	O
user	O
complaints	O
about	O
the	O
rendering	O
quality	O
.	O
</s>
<s>
Google	B-Application
Chrome	I-Application
uses	O
its	O
own	O
2D	O
library	O
called	O
Skia	B-Application
,	O
which	O
in	O
turn	O
renders	O
through	O
ANGLE	B-Language
on	O
Windows	O
.	O
)	O
</s>
<s>
In	O
Firefox	B-Application
70.0	O
,	O
on	O
old	O
hardware	O
,	O
Direct2D	B-Library
is	O
disabled	O
on	O
blacklisted	O
old	O
graphics	O
drivers	O
if	O
they	O
lack	O
features	O
and	O
area	O
is	O
blacked	O
out	O
e.g.	O
</s>
<s>
in	O
Google	B-Application
Maps	I-Application
.	I-Application
</s>
<s>
Ars	O
Technica	O
's	O
Peter	O
Bright	O
noted	O
in	O
the	O
summer	O
of	O
2012	O
that	O
"	O
most	O
desktop	O
applications	O
do	O
n't	O
use	O
Direct2D.	O
"	O
</s>
<s>
Microsoft	B-Operating_System
Office	I-Operating_System
2013	I-Operating_System
supports	O
either	O
Direct2D+DirectWrite	O
or	O
GDI+Uniscribe	O
for	O
display	O
rendering	O
and	O
typography	O
.	O
</s>
