-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
4362 lines (4357 loc) · 221 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to BLTsville</title>
<style type="text/css">
.cmd_line {
background: #000;
color: #fff;
padding: 10px;
}
.inline_code {
font-family: "Courier New", Courier, monospace;
font-size: small;
}
.code_block {
margin-left: 40px;
font-family: "Courier New", Courier, monospace;
font-size: small;
}
.small_code_block_in_table {
font-family: "Courier New", Courier, monospace;
font-size: x-small;
}
.small_code_block {
font-family: "Courier New", Courier, monospace;
font-size: x-small;
margin-left: 40px;
}
.underline_code {
font-family: "Courier New", Courier, monospace;
font-size: small;
text-decoration: underline;
}
.Code_Header {
font-size: xx-large;
font-weight: bold;
text-align: left;
font-family: "Courier New", Courier, monospace;
}
.Code_Header_2 {
font-size: x-large;
font-weight: bold;
text-align: left;
font-family: "Courier New", Courier, monospace;
}
.Code_Header_3 {
font-size: large;
font-weight: bold;
text-align: left;
font-family: "Courier New", Courier, monospace;
}
.imponly {
border: thin solid #666666;
margin-left: 40px;
background-color: #E5E5E5;
font-family: Arial, Helvetica, sans-serif;
color: #333333;
}
.Header1 {
margin: 0px 0 0 0;
font-size: xx-large;
font-weight: bold;
text-align: left;
line-height: normal;
background-color: #E0E0E0;
}
.Header2 {
font-size: xx-large;
font-weight: bold;
margin: 0px;
line-height: 100%;
}
.Header3 {
font-size: x-large;
font-weight: bold;
margin: 0px;
line-height: 100%;
}
.Header4 {
font-size: large;
font-weight: bold;
margin: 0px;
line-height: 100%;
}
.strong_emphasis {
text-decoration: underline;
font-weight: bold;
}
.filename {
font-family: Arial, Helvetica, sans-serif;
font-size: small;
}
.underline {
text-decoration: underline;
}
.grn_left {
text-align: left;
color: #009900;
}
.left_topbord {
text-align: left;
border-top-style: solid;
border-top-width: 1px;
}
.center_topbord {
text-align: center;
border-top-style: solid;
border-top-width: 1px;
}
.blue_left_botbord {
text-align: left;
border-bottom-style: solid;
border-bottom-width: 1px;
color: #0000FF;
}
.blue_center_botbord {
text-align: center;
border-bottom-style: solid;
border-bottom-width: 1px;
color: #0000FF;
}
.red_center {
text-align: center;
color: #FF0000;
}
.red_left {
text-align: left;
color: #FF0000;
}
.grn_center {
text-align: center;
color: #009900;
}
.red_center_topbord {
text-align: center;
border-top-style: solid;
border-top-width: 1px;
color: #FF0000;
}
.blu_center_topbord {
text-align: center;
border-top-style: solid;
border-top-width: 1px;
color: #0000FF;
}
.indent_thick_bord {
border-color: #000000;
border-style: solid;
margin-left: 40px;
}
.thin_bord {
border-style: solid;
border-width: 1px;
}
.thin_bord_dbl_botbord {
border-left-style: solid;
border-left-width: 1px;
border-right-style: solid;
border-right-width: 1px;
border-top-style: solid;
border-top-width: 1px;
border-bottom-style: double;
border-bottom-width: 3px;
}
.dl_link {
float: right;
}
.note {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
margin-left: 40px;
}
.small_note {
font-size: xx-small;
line-height: 100%;
}
.ctr {
text-align: center;
}
.glyph_cache {
font-family: "Courier New", Courier, monospace;
font-size: medium;
font-weight: normal;
font-style: normal;
margin-left: 40px;
background-color: #000000;
color: #FFFFFF;
}
.example {
border-style: solid;
border-width: 1px;
margin-left: 40px;
margin-right: 40px;
}
.rt_thick_bord {
border-right-style: solid;
border-right-color: #000000;
}
.indent {
margin-left: 40px;
}
.ctr_thin_bord {
border-style: solid;
border-width: 1px;
text-align: center;
}
.indent_thin_bord {
border-style: solid;
border-width: 1px;
margin-left: 40px;
}
.bold_sans {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
}
.nowrap {
border-style: solid;
border-width: 1px;
white-space: nowrap;
font-size: small;
}
</style>
</head>
<body>
<table style="width: 100%; line-height: 100%;">
<tr>
<td style="width: 484px">
<table>
<tr>
<td>
<div style="background-position: center; background-image: url('bvlogo.png'); width: 484px; height: 400px; background-repeat: no-repeat;">
<div style="position: relative; left: 0; top: 0;">
<a href="http://graphics.github.com/ocd">
<img src="ocdtab.png" alt="Now With OCD" style="border-width: 0; position: absolute; top: 0; right: 0;" /></a>
</div>
</div>
</td>
</tr>
<tr>
<td class="ctr"><span class="Header2">Version 2.2</span></td>
</tr>
</table>
</td>
<td>
<p>BLTsville is the open 2-D API designed to provide an abstract interface for both hardware and software 2-D implementations.</p>
<p>BLTs (BLock Transfers) involve the moving around of blocks (rectangles) of pixels. BLTsville is the place
to go for BLTs.</p>
<hr />
<table style="width: 100%">
<tr>
<td>
<div class="dl_link">
<img alt="CC BY-ND" longdesc="Creative Commons Attribution-NoDerivs 3.0 Unported License" src="http://i.creativecommons.org/l/by-nd/3.0/88x31.png" width="88" height="31" /></div>
<p class="Header2">License</p>
</td>
</tr>
<tr>
<td>
<div>
<p class="small_note">The API is designed and maintained by Texas Instruments, Inc., but anyone is free
to use it with no cost or obligation.</p>
<p>This project is licensed under the <a href="http://creativecommons.org/licenses/by-nd/3.0/">Creative
Commons Attribution-NoDerivs 3.0 Unported License</a> (user mode), and the
<a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License version 2</a> (kernel
mode).</p>
</div>
</td>
</tr>
</table>
<hr />
<table style="width: 100%">
<tr>
<td>
<p class="Header2">Dependencies</p>
</td>
</tr>
<tr>
<td>
<p>This project is dependent on the <a href="http://graphics.github.com/ocd">Open Color format Defintions
(OCD) project</a>.</p>
</td>
</tr>
</table>
<hr />
<table style="width: 100%">
<tr>
<td>
<p class="Header2">Source</p>
</td>
</tr>
<tr>
<td>
<div class="dl_link">
<a href="http://github.com/graphics/bltsville/zipball/master">
<img width="90" alt="download zip" src="http://github.com/images/modules/download/zip.png" /></a>
<a href="http://github.com/graphics/bltsville/tarball/master">
<img width="90" alt="download tar" src="http://github.com/images/modules/download/tar.png" /></a>
</div>
<div>
Get the source code (headers) from GitHub at <a href="http://github.com/graphics/bltsville">github.com/graphics/bltsville</a>,
or download the project in <a href="http://github.com/graphics/bltsville/zipball/master">zip</a> or
<a href="http://github.com/graphics/bltsville/tarball/master">tar</a> format.</div>
<p>You can also clone the project with <a href="http://git-scm.com">Git</a> by running:</p>
<pre><a class="cmd_line">$ git clone git://github.com/graphics/bltsville</a></pre>
</td>
</tr>
<tr>
<td><hr />
<table style="width: 100%">
<tr>
<td class="Header2">Wiki</td>
</tr>
<tr>
<td><a href="https://github.com/graphics/bltsville/wiki">https://github.com/graphics/bltsville/wiki</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<hr />
<p class="Header1">Points of Interest in BLTsville</p>
<table style="width: 100%">
<tr>
<td style="width: 50%" valign="top">
<ul>
<li>Solid fills</li>
<li>Pattern fills</li>
<li>Copies</li>
<li>Color format conversion<ul>
<li>Extensive color format support<ul>
<li>RGB, BGR</li>
<li>RGBA, ARGB, etc.</li>
<li>YCbCr (YUV)<ul>
<li>subsampling</li>
<li>packed</li>
<li>planar</li>
</ul>
</li>
<li>Monochrome</li>
<li>Alpha-only</li>
<li>Look-Up Table (LUT)</li>
</ul>
</li>
<li>Extensible color format</li>
</ul>
</li>
<li>ROP4<ul>
<li>Three inputs</li>
</ul>
</li>
<li>Blends<ul>
<li>Pre-defined Porter-Duff blends</li>
<li>Pre-defined DirectFB support</li>
<li>Extensible blends</li>
</ul>
</li>
<li>Multiple </li>
<li>Filters<ul>
<li>Extensible filters</li>
</ul>
</li>
<li>Independent horizontal and vertical <strong>flipping</strong></li>
<li>Independent <strong>scaling</strong> of all three inputs</li>
<li>Clipping</li>
<li>Independent <strong>rotation</strong> of all three inputs (multiples of 90 degrees)</li>
</ul>
</td>
<td style="width: 50%" valign="top">
<ul>
<li>Choice of <strong>scaling</strong> type<ul>
<li>Quality based choice</li>
<li>Speed based choice</li>
<li>Image type based choice</li>
<li>Specific scale type choice</li>
<li>Extensible scale type</li>
</ul>
</li>
<li>Synchronous operations</li>
<li>Asynchronous operations<ul>
<li>Client notification of BLT completion</li>
</ul>
</li>
<li>Batching<ul>
<li>Combine multiple BLTs into group that can be handled more efficiently by implementations<ul>
<li>Character BLTs</li>
<li>Multi-layer blending</li>
<li>ROP/Blend combination with specified ordering</li>
<li>etc.</li>
</ul>
</li>
<li>Delta BLTs</li>
</ul>
</li>
<li>Dithering<ul>
<li>Quality based choice</li>
<li>Speed based choice</li>
<li>Image type based choice</li>
<li>Specific dither type choice</li>
<li>Extensible dither type</li>
</ul>
</li>
<li>Any implementation support<ul>
<li>CPU</li>
<li>2-D Accelerator</li>
</ul>
</li>
</ul>
</td>
</tr>
</table>
<hr />
<ul>
<li>BLTsville does not dictate capabilities of the implementations<ul>
<li>Operations specified either work or return an error indicating that the operation is not supported</li>
</ul>
</li>
</ul>
<hr />
<p class="Header1">How to Get to BLTsville</p>
<p>BLTsville's API is defined in the BLTsville header files. A client must include <span class="inline_code">bltsville.h</span>
to access the implementations. This header includes the remaining headers (including <span class="inline_code">ocd.h</span>).</p>
<p class="note">NOTE: The <span class="underline_code">bvinternal.h</span><span class="underline"> header is for implementations
only</span> and should not be used by clients.</p>
<p>BLTsville has both user mode and a kernel mode interaces. The kernel mode interface is quite similar to (and compatible
with) the user mode, but due to the minor differences and license issues, there are two different sets of header files.</p>
<hr />
<p class="Header1">History of BLTsville</p>
<br />
<p class="Header4">Versions 1.x</p>
<p>BLTsville was based on a previous closed interface, which had a few implementations and shipped on a few devices.
That interface represented the 1.x versions. A lot was learned from that work, and these lessons were used in the
founding of BLTsville.</p>
<p class="Header4">Version 2.0</p>
<p>This was the initial release of the user mode interface. This version is not compatible with the 1.x versions.
Several minor updates were posted, but the API itself did not change, so no changes to the client or implementation were
required.</p>
<p class="Header4">Version 2.1</p>
<p>This is a minor update to the API, and it adds the kernel mode interface. Some additions to the API have been made.
Details of the changes are below with their compatibility matrices.</p>
<ul>
<li><span class="inline_code"><a href="#bv_cache">bv_cache()</a></span> was added to allow manipulation of the CPU cache.
This is an optional interface meant for hardware implementations.</li>
</ul>
<table class="indent_thin_bord">
<tr>
<td class="thin_bord"> </td>
<td class="ctr_thin_bord"><strong>2.0 Client</strong></td>
<td class="ctr_thin_bord"><strong>2.0 Client</strong><br />
(w/2.1 Headers)</td>
<td class="ctr_thin_bord"><strong>2.1 Client</strong></td>
</tr>
<tr>
<td class="thin_bord"><strong>2.0 Implementation</strong></td>
<td class="ctr_thin_bord">compatible</td>
<td class="ctr_thin_bord">New function and structure definitions have no effect.</td>
<td class="ctr_thin_bord">Client must deal with lack of <span class="inline_code"><a href="#bv_cache">bv_cache()</a></span>.</td>
</tr>
<tr>
<td class="thin_bord"><strong>2.0 Implementation</strong><br />
(w/2.1 Headers)</td>
<td class="ctr_thin_bord">New function and structure definitions have no effect.</td>
<td class="ctr_thin_bord">New function and structure definitions have no effect.</td>
<td class="ctr_thin_bord">Client must deal with lack of <span class="inline_code"><a href="#bv_cache">bv_cache()</a></span>.</td>
</tr>
<tr>
<td class="thin_bord"><strong>2.1 Implementation</strong></td>
<td class="ctr_thin_bord">New function and structures have no effect.</td>
<td class="ctr_thin_bord">New function and structures have no effect.</td>
<td class="ctr_thin_bord">compatible</td>
</tr>
</table>
<ul>
<li><span class="inline_code"><a href="#bvbuffdesc">bvbuffdesc</a></span> was extended with the
<span class="inline_code"><a href="#bvbuffdesc.auxtype">auxtype</a></span> and <span class="inline_code">
<a href="#bvbuffdesc.auxptr">auxptr</a></span> members to allow buffer descriptions beyond a virtual address.
Note that only the kernel mode interface currently includes a standard <span class="inline_code">auxtype</span>, but
user mode interface <span class="inline_code">auxtype</span>s may be added later. Both interfaces provide a mechanism
for individual vendors to add their own <span class="inline_code">auxtype</span>, using the same vendor ID mechanism
as the rest of BLTsville.</li>
</ul>
<table class="indent_thin_bord">
<tr>
<td class="thin_bord"> </td>
<td class="ctr_thin_bord"><strong>2.0 Client</strong></td>
<td class="ctr_thin_bord"><strong>2.0 Client</strong><br />
(w/2.1 Headers)</td>
<td class="ctr_thin_bord"><strong>2.1 Client</strong></td>
</tr>
<tr>
<td class="thin_bord"><strong>2.0 Implementation</strong></td>
<td class="ctr_thin_bord">compatible</td>
<td class="ctr_thin_bord">Client must clear <span class="inline_code"><a href="#bvbuffdesc">bvbuffdesc</a></span>
using <span class="inline_code"><span style="white-space: nowrap">sizeof(<a href="#bvbuffdesc">bvbuffdesc</a>)</span></span>.</td>
<td class="ctr_thin_bord">Implementation must handle <span class="inline_code">
<a href="#bvbuffdesc.structsize">bvbuffdesc.structsize</a> > <span style="white-space: nowrap">sizeof(<a href="#bvbuffdesc">bvbuffdesc</a>)</span></span>.</td>
</tr>
<tr>
<td class="thin_bord"><strong>2.0 Implementation</strong><br />
(w/2.1 Headers)</td>
<td class="ctr_thin_bord">Implementation must handle <span class="inline_code">
<a href="#bvbuffdesc.structsize">bvbuffdesc.structsize</a> < <span style="white-space: nowrap">sizeof(<a href="#bvbuffdesc">bvbuffdesc</a>)</span></span>.</td>
<td class="ctr_thin_bord">Client must clear <span class="inline_code"><a href="#bvbuffdesc">bvbuffdesc</a></span>
using <span class="inline_code"><span style="white-space: nowrap">sizeof(<a href="#bvbuffdesc">bvbuffdesc</a>)</span></span>.</td>
<td class="ctr_thin_bord">Client must deal with implementation that uses <span class="inline_code">
<a href="#bvbuffdesc.virtaddr">bvbuffdesc.virtaddr</a></span> or returns error if <span class="inline_code">
<a href="#bvbuffdesc.virtaddr">bvbuffdesc.virtaddr</a></span> is 0.</td>
</tr>
<tr>
<td class="thin_bord"><strong>2.1 Implementation</strong></td>
<td class="ctr_thin_bord">Implementation must handle <span class="inline_code">
<a href="#bvbuffdesc.structsize">bvbuffdesc.structsize</a> < <span style="white-space: nowrap">sizeof(<a href="#bvbuffdesc">bvbuffdesc</a>)</span></span>.</td>
<td class="ctr_thin_bord">Client must clear <span class="inline_code"><a href="#bvbuffdesc">bvbuffdesc</a></span>
using <span class="inline_code"><span style="white-space: nowrap">sizeof(<a href="#bvbuffdesc">bvbuffdesc</a>)</span></span>.</td>
<td class="ctr_thin_bord">compatible</td>
</tr>
</table>
<ul>
<li>Added documentation of <a href="#NOP">NOP BLT</a> used as synchronization mechanism for <a href="#BVFLAG_ASYNC">
asynchronous BLTs</a>.<ul>
<li>Clients that do not use <a href="#BVFLAG_ASYNC">asynchronous BLTs</a> or the <a href="#NOP">NOP BLT</a> will
not be affected.</li>
<li>Implementations that do not support the NOP BLT will return an error. This will not cause a problem
for clients when using implementations which are actually synchronous. For clients using asynchronous
implementations, an alternate supported but innocuous BLT will be necessary (e.g. copying a pixel to itself).</li>
</ul>
</li>
</ul>
<p class="Header4">Version 2.2</p>
<p>This is a minor update which includes the following:</p>
<ul>
<li>Addition of the <span class="inline_code"><a href="#src2auxdstrect">src2auxdstrect</a></span> and
<span class="inline_code"><a href="#maskauxdstrect">maskauxdstrect</a></span> members to <span class="inline_code">
<a href="#bvbltparams">bvbltparams</a></span> with example.</li>
<li>Addition of <span class="inline_code"><a href="#BVFLAG_SRC2_AUXDSTRECT">BVFLAG_SRC2_AUXDSTRECT</a></span> and <span class="inline_code">
<a href="#BVFLAG_MASK_AUXDSTRECT">BVFLAG_MASK_AUXDSTRECT</a></span> flags.</li>
<li>Added <span class="inline_code"><a href="#BVAT_PHYSADDR">BVAT_PHYSADDR</a></span> to the kernel mode
<span class="inline_code"><a href="#bvbuffdesc.auxtype">bvbuffdesc.auxtype</a></span> enumerations.</li>
<li>Added clarification to the <span class="inline_code"><a href="#bvphysdesc">bvphysdesc</a></span> documentation.</li>
</ul>
<p>Compatibility</p>
<ul>
<li>Clients that do not use the <span class="inline_code"><a href="#BVFLAG_SRC1_AUXDSTRECT">BVFLAG_*_AUXDSTRECT</a></span>
flags will not be affected.</li>
<li>Clients using the new (long) <span class="inline_code"><a href="#bvbltparams">bvbltparams</a></span> will work with
older implementations. If the clients set the <span class="inline_code"><a href="#BVFLAG_SRC2_AUXDSTRECT">
BVFLAG_*_AUXDSTRECT</a></span> flags, the implementations will return <span class="inline_code">BVERR_FLAGS</span>,
indicating the lack of support for this feature.</li>
<li>Implementations supporting the new <span class="inline_code"><a href="#bvbltparams">bvbltparams</a></span> will
accept the older (smaller) version, distinguished by the <span class="inline_code">
<a href="#bvbltparams.structsize">structsize</a></span> member. Clients using the older versions will not set
the <span class="inline_code"><a href="#BVFLAG_SRC2_AUXDSTRECT">BVFLAG_*_AUXDSTRECT</a></span> flags, so the new
members will not be utilized.</li>
<li>Clients using <span class="inline_code"><a href="#BVAT_PHYSADDR">BVAT_PHYSADDR</a></span> will get an error from
implementations that do not support this enumeration. The <span class="inline_code"><a href="#BVAT_PHYSDESC">
BVAT_PHYSDESC</a></span> may be used if supported by the implementation, but care must be taken to ensure the buffer
is defined properly. See <span class="inline_code"><a href="#bvphysdesc">bvphysdesc</a></span> for details.</li>
</ul>
<hr />
<p class="Header1">BLTsville Neighborhoods</p>
<p>Implementations may be software (CPU) or 2-D hardware, and many may coexist. Each implementation will have an individual
entry point, so it can be directly addressed. But there will also be a more general interface for each of these two
types of implementations so that system integrators can choose the most appropriate implementation. In other words,
the system integrator will choose one software and one 2-D hardware implementation to be the "default" used when a client
does not need to choose a specific implementation.</p>
<p class="Header2">User Mode Interface</p>
<p>Clients use the standard names below to access the default implementations. The client then imports the pointers
to the functions. (The specific name decoration and import method will be dictated by the host Operating System (O/S).)
Some examples:</p>
<ul>
<li>CPU: <span class="filename">bltsville_cpu</span><ul>
<li>Linux/Android: <span class="filename">libbltsville_cpu.so</span></li>
<li>Windows: <span class="filename">bltsville_cpu.dll</span></li>
<li>etc.</li>
</ul>
</li>
<li>2-D hardware: <span class="filename">bltsville_hw2d</span><ul>
<li>Linux/Android: <span class="filename">libbltsville_hw2d.so</span></li>
<li>Windows: <span class="filename">bltsville_hw2d.dll</span></li>
<li>etc.</li>
</ul>
</li>
</ul>
<p>Usually these entry points will be symbolic links (either explicit in systems like Linux which support them, or implicit
using a thin wrapper) to the specific implementation. This allows system integrators to connect the client with the
most capable implementation available in the system. For example, <span class="filename">bltsville_hw2d</span> might
be a symbolic link to <span class="filename">bltsville_gc2d</span>.</p>
<p>In addition, there may be more implementations co-existing in a given system. These will have additional unique
names as determined by the vendors. For example:</p>
<ul>
<li>Reference CPU software implementation: <span class="filename">bltsville_refcpu</span></li>
<li>System DMA 2-D hardware implementation: <span class="filename">bltsville_mydma</span></li>
</ul>
<p class="Header3">Initialization</p>
<p>In general, each O/S has the ability to manually load a library. This in turn causes a function in the library
to be called so the library can perform initialization. Unfortunately, not all O/Ss allow this initialization
function to return an error if the initialization fails. Equally unfortunately, it may be necessary for the
initialization to be performed in that function. To accommodate this, BLTsville defers the specific initialization
to the O/S environment.</p>
<p class="Header4">Linux/Android</p>
<p>The client will call <span class="inline_code">dlopen()</span> to open the library. It will then import the
<span class="inline_code">bv_*()</span> functions, and call them as desired. Initialization will occur in
association with one or more of these activities. If the initialization fails, the bv_*() functions will return
the <span class="inline_code">BVERR_RSRC</span> error, indicating that a required resource was not obtained.</p>
<p class="imponly"><strong>Implementations Only<br />
</strong><br />
If the library has designated a function with the <span class="inline_code">__attribute__ ((constructor))</span>, that
function will be called. Linux implementations may use this function to perform initialization (including opening
an interface to an associated kernel module). However, since this function cannot return an error, and thus cannot
fail, if the initialization fails, this must be recorded. Then, when the client calls any of the
<span class="inline_code">bv_*()</span> functions, these should immediately return the <span class="inline_code">
BVERR_RSRC</span> error, indicating that the library was unable to initialize (obtain a necessary resource).<br />
<br />
Linux implementations may also choose to initialize on the first call to a <span class="inline_code">bv_*()</span>
function. Failure is likewise indicated by returning the <span class="inline_code">BVERR_RSRC</span> error.<br />
<br />
<strong>NOTE: Be careful not to repeatedly attempt initialization when a failure is encountered. Some
initializations, and especially initialization failures, can take a long time. This means clients trying to call
</strong><span class="inline_code"><strong>bv_*()</strong></span><strong> functions (presumably before falling back to
alternatives) will be repeatedly penalized if the library can't initialize. Instead, attempt initialization
once, and from them on return <span class="inline_code">BVERR_RSRC</span>.</strong></p>
<p class="Header2">Kernel Mode Interface</p>
<p>For most kernel space BLTsville clients, only a 2-D hardware implementation will be used. However, both types of
implementations are supported. Clients use the standard names below to access the default implementations and obtain
pointers to the functions. (The specific method of obtaining the interface will be dictated by the host Operating
System (O/S).) Some examples:</p>
<ul>
<li>CPU<ul>
<li>Linux/Android <span class="inline_code">bvcpu_entry()</span></li>
<li>etc.</li>
</ul>
</li>
<li>2-D hardware<ul>
<li>Linux/Android <span class="inline_code">bv2d_entry()</span></li>
<li>etc.</li>
</ul>
</li>
</ul>
<p>These entry points may represent the implementations themselves, but more likely they will link the client to the implementations
using more specific names. For example, <span class="inline_code">bv2d_entry()</span> may link the client to
<span class="inline_code">gcbv_entry()</span>.</p>
<p>In addition, there may be more implementations co-existing in the kernel. These will require additional unique
names as determined by the vendors. For example:</p>
<ul>
<li>Reference CPU software implementation: <span class="inline_code">cpurefbv_entry()</span></li>
<li>Vivante GC320 2-D hardware implementation: <span class="inline_code">gcbv_entry()</span></li>
</ul>
<hr />
<p class="Header1">Things To Do In BLTsville</p>
<p>BLTsville's interface consists of three or four functions per implementation, which must be imported by the
client at run time:</p>
<ul>
<li><span class="inline_code"><a href="#bv_map">bv_map()</a></span></li>
<li><span class="inline_code"><a href="#bv_blt">bv_blt()</a></span></li>
<li><span class="inline_code"><a href="#bv_unmap">bv_unmap()</a></span></li>
<li><span class="inline_code"><a href="#bv_cache">bv_cache()</a></span> (optional)</li>
</ul>
<p class="note">NOTE: If the library failed to initialize, these functions will return <span class="inline_code">
BVERR_RSRC</span>, indicating that a required resource was not obtained.</p>
<a name="bv_map" class="Code_Header">bv_map()</a>
<p class="code_block">enum bverror bv_map(<a href="#bvbuffdesc">struct bvbuffdesc* buffdesc</a>);</p>
<p><span class="strong_emphasis">BLTsville does not allocate buffers.</span> Clients must describe a buffer
in BLTsville using the <span class="inline_code"><a href="#bvbuffdesc">bvbuffdesc</a></span> structure so a given implementation
can access the buffer.</p>
<p><span class="inline_code">bv_map()</span> is used to provide the implementation an opportunity to associate hardware
resources with the specified buffer. Most hardware requires this type of mapping, and there is usually appreciable
overhead associated with it. By providing a separate call for this operation, BLTsville allows the client to move
this overhead to the most appropriate time in its execution.</p>
<p>For a given buffer, the client can call the <span class="inline_code">bv_map()</span> function imported from each implementation
to establish the mapping immediately. But this is not required.</p>
<p>As a special bonus, BLTsville clients can call to any implementation's <span class="inline_code">bv_map()</span>.
This is sufficient to indicate that the client can be trusted to make the corresponding call to
<span class="inline_code"><a href="#bv_unmap">bv_unmap()</a></span> upon destruction of the buffer. Then when a client
calls an implementation's <span class="inline_code"><a href="#bv_blt">bv_blt()</a></span>, if the mapping needs to be done,
it's done at that time. But the mapping is maintained, so that the overhead is avoided on subsequent
<span class="inline_code"><a href="#bv_blt">bv_blt()</a></span> calls. This lets implementations use <em>lazy mapping</em>
only as necessary. If an implementation is not called, the mapping is not done.</p>
<p><em>Normally, the lowest overhead </em><span class="inline_code"><em>bv_map()</em></span><em> call will be in the CPU-based
implementation. So most clients will want to make a single, low overhead </em><span class="inline_code"><em>bv_map()</em></span><em>
call to the bltsville_cpu implementation to avoid the mapping/unmapping overhead on each </em><span class="inline_code">
<a href="#bv_blt"><em>bv_blt()</em></a></span><em> call, while avoiding the mapping overhead when possible.</em></p>
<p><em><strong>Calling </strong></em><span class="inline_code"><em><strong>bv_map()</strong></em></span><em><strong> is
actually optional prior to calling </strong></em><span class="inline_code"><a href="#bv_blt"><em><strong>bv_blt()</strong></em></a></span><em><strong>.
However, if it is not called at least once for a given buffer, it must be assumed that </strong></em>
<span class="inline_code"><a href="#bv_unmap"><strong><em>bv_unmap()</em></strong></a></span><em><strong> will not be called.
So the mapping must be done when </strong></em><span class="inline_code"><a href="#bv_blt"><em><strong>bv_blt()</strong></em></a></span><em><strong>
is called, and unmapping done when it is complete. This means the overhead will be incurred for every </strong>
</em><a href="#bv_blt" class="inline_code"><em><strong>bv_blt()</strong></em></a><em><strong> call which uses that buffer.</strong></em></p>
<p class="note">NOTE: Obviously any API cannot add capabilities beyond an implementation's capabilities. So, for example,
if an implementation requires memory to be allocated from a special pool of memory, that responsibility falls upon the client.
The <span class="inline_code">bv_map()</span> function for that implementation will need to check the characteristics of
the memory and return an error if it does not meet the necessary criteria.</p>
<p class="Header4"><a name="bv_map_Function_Sequences">Function Sequences</a></p>
<p>To clarify, here are some function sequences and the operations associated with them:</p>
<table class="indent">
<tr>
<td class="ctr_thin_bord"><strong>Implementation</strong></td>
<td class="ctr_thin_bord"><strong>Function</strong></td>
<td class="ctr_thin_bord"><strong>Operation</strong></td>
</tr>
<tr>
<td class="ctr_thin_bord">A</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_blt">bv_blt()</a></span></td>
<td class="thin_bord">map A<br />
BLT A<br />
unmap A</td>
</tr>
<tr>
<td class="ctr_thin_bord">A</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_blt">bv_blt()</a></span></td>
<td class="thin_bord">map A<br />
BLT A<br />
unmap A</td>
</tr>
<tr>
<td class="ctr_thin_bord">B</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_blt">bv_blt()</a></span></td>
<td class="thin_bord">map B<br />
BLT B<br />
unmap B</td>
</tr>
</table>
<br />
<table class="indent">
<tr>
<td class="ctr_thin_bord"><strong>Implementation</strong></td>
<td class="ctr_thin_bord"><strong>Function</strong></td>
<td class="ctr_thin_bord"><strong>Operation</strong></td>
</tr>
<tr>
<td class="ctr_thin_bord">A</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_map">bv_map()</a></span></td>
<td class="thin_bord">map A</td>
</tr>
<tr>
<td class="ctr_thin_bord">A</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_blt">bv_blt()</a></span></td>
<td class="thin_bord">BLT A</td>
</tr>
<tr>
<td class="ctr_thin_bord">A</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_blt">bv_blt()</a></span></td>
<td class="thin_bord">BLT A</td>
</tr>
<tr>
<td class="ctr_thin_bord">A</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_unmap">bv_unmap()</a></span></td>
<td class="thin_bord">unmap A</td>
</tr>
</table>
<br />
<table class="indent">
<tr>
<td class="ctr_thin_bord"><strong>Implementation</strong></td>
<td class="ctr_thin_bord"><strong>Function</strong></td>
<td class="ctr_thin_bord"><strong>Operation</strong></td>
</tr>
<tr>
<td class="ctr_thin_bord">A</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_map">bv_map()</a></span></td>
<td class="thin_bord">map A</td>
</tr>
<tr>
<td class="ctr_thin_bord">B</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_map">bv_map()</a></span></td>
<td class="thin_bord">map B</td>
</tr>
<tr>
<td class="ctr_thin_bord">A</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_blt">bv_blt()</a></span></td>
<td class="thin_bord">BLT A</td>
</tr>
<tr>
<td class="ctr_thin_bord">B</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_blt">bv_blt()</a></span></td>
<td class="thin_bord">BLT B</td>
</tr>
<tr>
<td class="ctr_thin_bord">A</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_unmap">bv_unmap()</a></span></td>
<td class="thin_bord">unmap A</td>
</tr>
<tr>
<td class="ctr_thin_bord">B</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_unmap">bv_unmap()</a></span></td>
<td class="thin_bord">unmap B</td>
</tr>
</table>
<br />
<table class="indent">
<tr>
<td class="ctr_thin_bord"><strong>Implementation</strong></td>
<td class="ctr_thin_bord"><strong>Function</strong></td>
<td class="ctr_thin_bord"><strong>Operation</strong></td>
</tr>
<tr>
<td class="ctr_thin_bord">A</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_map">bv_map()</a></span></td>
<td class="thin_bord">map A</td>
</tr>
<tr>
<td class="ctr_thin_bord">B</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_blt">bv_blt()</a></span></td>
<td class="thin_bord">map B<br />
BLT B</td>
</tr>
<tr>
<td class="ctr_thin_bord">B</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_blt">bv_blt()</a></span></td>
<td class="thin_bord">BLT B</td>
</tr>
<tr>
<td class="ctr_thin_bord">A</td>
<td class="thin_bord"><span class="inline_code"><a href="#bv_unmap">bv_unmap()</a></span></td>
<td class="thin_bord">unmap A<br />
unmap B</td>
</tr>
</table>
<br />
<div class="note">
NOTE: Calling <span class="inline_code">bv_map()</span> and <span class="inline_code"><a href="#bv_unmap">
bv_unmap()</a></span> with the same <span class="inline_code"><a href="#bvbuffdesc">bvbuffdesc</a></span> from
different, unsynchronized threads, even (especially) from different implementations, will result in undefined
behavior. This is similar to calling <span class="inline_code">malloc()</span> and <span class="inline_code">
free()</span> using the same buffer pointer in different, unsynchronized threads. While this may work
sometimes and for some implementations and combinations of implementations, BLTsville does not provide any
synchronization mechanism to make this safe. Clients must ensure that these calls are synchronized in cases
where such behavior appears to be necessary.</div>
<br />
<a name="bv_blt" class="Code_Header">bv_blt()</a>
<p class="code_block">enum bverror bv_blt(<a href="#bvbltparams">struct bvbltparams* bltparams</a>);</p>
<p>The main function of BLTsville is <span class="inline_code">bv_blt()</span>. A <span class="inline_code">
<a href="#bvbltparams">bvbltparams</a></span> structure is passed into <span class="inline_code">bv_blt()</span> to trigger
the desired 2-D operation.</p>
<a name="bv_unmap" class="Code_Header">bv_unmap()</a>
<p class="code_block">enum bverror bv_unmap(<a href="#bvbuffdesc">struct bvbuffdesc* buffdesc</a>);</p>
<p><span class="inline_code">bv_unmap()</span> is used to free implementation resources associated with a buffer.
Normally, if <span class="inline_code"><a href="#bv_map">bv_map()</a></span> was called for a given buffer,
<span class="inline_code">bv_unmap()</span> should be called as well.</p>
<p>For convenience, only one <span class="inline_code">bv_unmap()</span> needs to be called for each buffer, regardless
of how many implementations were used, including multiple calls to <span class="inline_code"><a href="#bv_map">bv_map()</a></span>.</p>
<p>Also for convenience, <span class="inline_code">bv_unmap()</span> may be called multiple times on the same buffer.
Note that only the first call will actually free (all) the associated resources. See the
<a href="#bv_map_Function_Sequences">Function Sequences</a> under <span class="inline_code"><a href="#bv_map">bv_map()</a></span>
for more details.</p>
<p class="imponly"><strong>Implementations Only</strong><br />
<br />
Implementations must ensure that unmapping of buffers which are in use by asynchronous BLTs are appropriately delayed to
avoid improper access.</p>
<a name="bv_cache" class="Code_Header">bv_cache()</a>
<p class="code_block">enum bverror bv_cache(<a href="#bvcopprams">struct bvcopparams *copparams</a>);</p>
<p><span class="inline_code">bv_cache()</span> provides manual CPU cache control to maintain cache coherence of surfaces
between the CPU and other hardware. The <a href="#bvbuffdesc">bvcopparams</a> structure provides the information needed
to properly manipulate the CPU cache.</p>
<p>This function is <em>optional</em>. If this function fails to import, it means the implementation does not provide
it, but <span class="inline_code"><a href="#bv_map">bv_map()</a></span>, <span class="inline_code">
<a href="#bv_blt">bv_blt()</a></span>, and <span class="inline_code"><a href="#bv_unmap">bv_unmap()</a></span> may still
be used.</p>
<p><em>In general, this function will be provided with BLTsville implementations which utilize 2-D hardware, even though
it manipulates the CPU cache. This is because most systems require a kernel module to manipulate the cache, and this
is not always practical to include with a user-mode CPU implementation.</em></p>
<p><strong>BEWARE: Manipulation of the CPU cache is tricky. Moreover, different CPUs behave differently, so
cache manipulation that works on one device may fail on another. Also, mismanaged operation of the cache can have
significant impact on overall system performance. And incorrect manipulation of the cache can cause instability or
crashes. Please read and understand all of the discussions below before using this function.</strong></p>
<ol>
<li>To avoid system instability, do not perform cache operations on buffers which would not be accessed by BLTsville.</li>
<li>For maximum performance, combine adjacent rectangles into one <span class="inline_code">bv_cache()</span> call.
For example, when BLTing a line of characters, do not issue a <span class="inline_code">bv_cache()</span> call for each
character. Instead, make one call to bv_cache() which includes all the characters.</li>
<li>When using a hardware BLTsville implementation to read data written into a cached surface by the CPU, use the
<span class="inline_code"><a href="#CPU_TO_DEVICE">BVCACHE_CPU_TO_DEVICE</a></span> operation after the CPU has completed
its operation and before the hardware BLTsville operation is initiated.</li>
<li>When using a hardware BLTsville implementation to write data into a cached surface that will be read by the CPU,
use the <span class="inline_code"><a href="#CPU_FROM_DEVICE">BVCACHE_CPU_FROM_DEVICE</a></span> operation after the
hardware BLTsville operation has completed (note this means after the callback if the BLT is asynchronous) and before
the CPU accesses the surface.</li>
<li>When using a hardware BLTsville implementation to write data into a cached surface that has been written by the
CPU, using the <span class="inline_code"><a href="#CPU_TO_DEVICE">BVCACHE_CPU_TO_DEVICE</a></span> operation after the
CPU has completed its operation and before the hardware BLTsville operation is initiated.<ul>
<li class="bold_sans">NOTE: This cache operation may not be necessary on all hardware, but it is good practice to perform it
anyway. This operation will be necessary for a CPU with a write allocation policy on the cache, but may not
be necessary for CPUs without such a configuration.</li>
<li class="bold_sans"><strong>NOTE WELL: CPU access to a destination buffer is not always initiated by the client. Buffers
recently allocated may be cleared by the CPU on behalf of the client via the allocation call. Failure to perform
this operation may result in image corruption even if no further CPU accesses are performed on the surface!</strong></li>
</ul>
</li>
</ol>
<table class="example">
<tr>
<td>
<p><strong>Example</strong>: On one particular device, a surface was allocated using the standard user mode
<span class="inline_code">malloc()</span>. An image was copied into a portion of this surface using a hardware
implementation of BLTsville. The result was then read by the CPU.</p>
<p>Logically, <span class="inline_code">bv_cache()</span> was used to perform a <span class="inline_code">
<a href="#CPU_FROM_DEVICE">BVCACHE_CPU_FROM_DEVICE</a></span> operation after the hardware-based BLTsville operation
completed, but before the CPU read was performed. However, corruption appeared both inside the image copied,
as well as outside the image!</p>
<p>Both corruptions were caused by not realizing that there was a CPU operation (clear) performed on behalf of the
<span class="inline_code">malloc()</span>, for which the proper cache manipulation was not performed.</p>
<p>The corruption outside the image was due to data in the cache being invalidated before it reached the memory.
As mentioned above, buffers allocated are normally cleared by the system. In this case, since the buffer used
for the surface was configured with a write allocated cache, this meant that not all writes to clear the buffer
were in memory when the <span class="inline_code"><a href="#CPU_FROM_DEVICE">BVCACHE_CPU_FROM_DEVICE</a></span>
operation was performed. As a result, the uncommitted data in the cache was invalidated and lost, and the
previous contents of the memory remained for the CPU to read.</p>
<p>The corruption inside the image was caused by data in the cache being committed to memory after the hardware
BLT completed, but before the <span class="inline_code"><a href="#CPU_FROM_DEVICE">BVCACHE_CPU_FROM_DEVICE</a></span>
operation was executed.</p>
<p>Both corruptions were corrected by performing a <span class="inline_code"><a href="#CPU_TO_DEVICE">BVCACHE_CPU_TO_DEVICE</a></span>
operation on the <span class="underline">destination</span> surface <strong>before</strong> performing the BLT (item
5 above), in addition to the <span class="inline_code"><a href="#CPU_FROM_DEVICE">BVCACHE_CPU_FROM_DEVICE</a></span>
operation performed <strong>after</strong> the BLT (item 3 above).</p>
</td>
</tr>
</table>
<br />
<hr /><a name="bvbltparams" class="Code_Header">bvbltparams</a>
<p><span class="inline_code">bvbltparams</span> is the central structure in BLTsville. This structure holds the details
of the BLT being requested by the client.</p>
<p class="small_code_block">union bvop {<br />
unsigned short <a href="#rop">rop</a>;<br />
enum bvblend <a href="#blend">blend</a>;<br />
struct bvfilter *<a href="#filter">filter</a>;<br />
};<br />
<br />
struct bvinbuff {<br />
<a href="#bvbuffdesc">struct bvbuffdesc</a> *<a href="#src1.desc">desc</a>;<br />
<a href="#bvtileparams">struct bvtileparams</a> *<a href="#src1.tileparams">tileparams</a>;<br />
};<br />
<br />
struct bvbltparams {<br />
unsigned int <a href="#bvbltparams.structsize">structsize</a>;<br />
<br />
char *<a href="#errdesc">errdesc</a>;<br />
<br />
unsigned long <a href="#implementation">implementation</a>;<br />
unsigned long <a href="#flags">flags</a>;<br />
union bvop <a href="#op">op</a>;<br />
<br />
void *<a href="#colorkey">colorkey</a>;<br />
union bvalpha <a href="#globalalpha">globalalpha</a>;<br />
<br />
enum bvscalemode <a href="#scalemode">scalemode</a>;<br />
enum bvdithermode <a href="#dithermode">dithermode</a>;<br />
<br />
<a href="#bvbuffdesc">struct bvbuffdesc</a> *<a href="#dstdesc">dstdesc</a>;<br />
<a href="#bvsurfgeom">struct bvsurfgeom</a> *<a href="#dstgeom">dstgeom</a>;<br />
<a href="#bvrect">struct bvrect</a> <a href="#dstrect">dstrect</a>;<br />
<br />
union bvinbuff <a href="#src1">src1</a>;<br />
<a href="#bvsurfgeom">struct bvsurfgeom</a> *<a href="#src1geom">src1geom</a>;<br />
<a href="#bvrect">struct bvrect</a> <a href="#src1rect">src1rect</a>;<br />
<br />
union bvinbuff <a href="#src2">src2</a>;<br />
<a href="#bvsurfgeom">struct bvsurfgeom</a> *<a href="#src2geom">src2geom</a>;<br />
<a href="#bvrect">struct bvrect</a> <a href="#src2rect">src2rect</a>;<br />
<br />
union bvinbuff <a href="#mask">mask</a>;<br />
<a href="#bvsurfgeom">struct bvsurfgeom</a> *<a href="#maskgeom">maskgeom</a>;<br />
<a href="#bvrect">struct bvrect</a> <a href="#maskrect">maskrect</a>;<br />
<br />
<a href="#bvrect">struct bvrect</a> <a href="#cliprect">cliprect</a>;<br />
<br />
unsigned long <a href="#batchflags">batchflags</a>;<br />
struct bvbatch *<a href="#batch">batch</a>;<br />
<br />
void (*<a href="#callbackfn">callbackfn</a>)(<a href="#bvcallbackerror">struct
bvcallbackerror</a> *err,<br />
unsigned long callbackdata);<br />
unsigned long <a href="#callbackdata">callbackdata</a>;<br />
<br />
<a href="#bvrect">struct bvrect</a> <a href="#src2auxdstrect">src2auxdstrect</a>;<br />
<a href="#bvrect">struct bvrect</a> <a href="#maskauxdstrect">maskauxdstrect</a>;<br />
};</p>
<a name="bvbltparams.structsize" class="Code_Header_2">bvbltparams.structsize</a>
<p><span class="code_block">unsigned long structsize; /* input */</span></p>
<p>This member is used to allow backwards and forwards compatibility between versions of BLTsville. It should be set
to the <span class="inline_code">sizeof()</span> the structure by the client or implementation, whichever allocated the
structure.</p>
<p>BLTsville is designed to be forwards and backwards compatible between client and library versions. But this compatibility
would be eliminated if clients chose to check for a specific version of the BLTsville implementations and fail if the specific
version requested was not in place. So, instead of exporting a version number, BLTsville structures use the
<span class="inline_code">structsize</span> member to indicate the number of bytes in the structure. This is used
to communicate between the client and implementation which portions of the structure exist. This effectively bypasses
the concept of a version and focuses on the specifics of what changes need to be considered to maintain compatibility.</p>
<ol>
<li>When an old client calls into a new implementation, that implementation will realize if the client only provides
a subset of an updated structure. The implementation will handle this and utilize only that information which
has been provided. New features will be disabled, but functionality will be maintained.</li>
<li>When a new client calls into an old implementation, that implementation will ignore the extra members of the structure