/external/wpa_supplicant_8/wpa_supplicant/src/drivers/ |
H A D | ndis_events.c | 154 ndis_events_query_interface(IWbemObjectSink *this, REFIID riid, void **obj) argument 160 *obj = this; 161 IWbemObjectSink_AddRef(this); 169 static ULONG STDMETHODCALLTYPE ndis_events_add_ref(IWbemObjectSink *this) argument 171 struct ndis_events_data *events = (struct ndis_events_data *) this; 176 static ULONG STDMETHODCALLTYPE ndis_events_release(IWbemObjectSink *this) argument 178 struct ndis_events_data *events = (struct ndis_events_data *) this; 303 ndis_events_indicate(IWbemObjectSink *this, long lObjectCount, argument 306 struct ndis_events_data *events = (struct ndis_events_data *) this; 387 ndis_events_set_status(IWbemObjectSink *this, lon argument [all...] |
/external/chromium_org/third_party/WebKit/Source/devtools/front_end/heap_snapshot_worker/ |
H A D | HeapSnapshot.js | 9 * notice, this list of conditions and the following disclaimer. 11 * copyright notice, this list of conditions and the following disclaimer 16 * this software without specific prior written permission. 56 this._snapshot = snapshot; 57 this._edges = snapshot.containmentEdges; 58 this.edgeIndex = edgeIndex || 0; 67 return new WebInspector.HeapSnapshotEdge(this._snapshot, this.edgeIndex); 91 return this._snapshot.createNode(this [all...] |
/external/chromium_org/chrome/browser/resources/chromeos/wallpaper_manager/js/ |
H A D | wallpaper_manager.js | 2 // Use of this source code is governed by a BSD-style license that can be 17 this.dialogDom_ = dialogDom; 18 this.document_ = dialogDom.ownerDocument; 19 this.enableOnlineWallpaper_ = loadTimeData.valueExists('manifestBaseURL'); 20 this.selectedCategory = null; 21 this.selectedItem_ = null; 22 this.progressManager_ = new ProgressManager(); 23 this.customWallpaperData_ = null; 24 this.currentWallpaper_ = null; 25 this [all...] |
/external/chromium_org/third_party/WebKit/Source/devtools/front_end/extensions/ |
H A D | ExtensionServer.js | 9 * notice, this list of conditions and the following disclaimer. 11 * copyright notice, this list of conditions and the following disclaimer 16 * this software without specific prior written permission. 37 this._clientObjects = {}; 38 this._handlers = {}; 39 this._subscribers = {}; 40 this._subscriptionStartHandlers = {}; 41 this._subscriptionStopHandlers = {}; 42 this._extraHeaders = {}; 43 this [all...] |
/external/chromium_org/third_party/libjpeg_turbo/ |
H A D | turbojpeg.c | 8 * this list of conditions and the following disclaimer. 10 * this list of conditions and the following disclaimer in the documentation 13 * contributors may be used to endorse or promote products derived from this 29 /* TurboJPEG/LJT: this implements the TurboJPEG API using libjpeg or 118 #define getinstance(handle) tjinstance *this=(tjinstance *)handle; \ 120 if(!this) {snprintf(errStr, JMSG_LENGTH_MAX, "Invalid handle"); \ 122 cinfo=&this->cinfo; dinfo=&this->dinfo; 451 if(setjmp(this->jerr.setjmp_buffer)) return -1; 452 if(this 478 _tjInitCompress(tjinstance *this) argument 503 tjinstance *this=NULL; local 841 _tjInitDecompress(tjinstance *this) argument 866 tjinstance *this; local 1174 tjinstance *this=NULL; tjhandle handle=NULL; local [all...] |
/external/ipsec-tools/src/racoon/ |
H A D | oakley.c | 13 * notice, this list of conditions and the following disclaimer. 15 * notice, this list of conditions and the following disclaimer in the 18 * may be used to endorse or promote products derived from this software 598 vchar_t *this = NULL; /* Kn */ local 603 this = oakley_prf(iph2->ph1->skeyid_d, seed, 605 if (!this) { 610 vfree(this); 618 res = vrealloc(res, l + this->l); 628 vfree(this); 632 memcpy(res->v + l, this [all...] |
/external/iptables/iptables/ |
H A D | ip6tables.c | 24 * along with this program; if not, write to the Free Software 205 " %s -h (print this help information)\n\n", 265 " --modprobe=<command> try to insert modules using this command\n" 313 "option for this command\n", 324 "Illegal option `-%c' with this command\n", 897 const char *this; local 914 for (this = ip6tc_first_chain(handle); 915 this; 916 this = ip6tc_next_chain(handle)) { 920 if (chain && strcmp(chain, this) ! 1137 const char *this = NULL; local [all...] |
H A D | iptables.c | 24 * along with this program; if not, write to the Free Software 199 " %s -h (print this help information)\n\n", 259 " --modprobe=<command> try to insert modules using this command\n" 307 "option for this command\n", 318 "Illegal option `-%c' with this command\n", 882 const char *this; local 899 for (this = iptc_first_chain(handle); 900 this; 901 this = iptc_next_chain(handle)) { 905 if (chain && strcmp(chain, this) ! 1128 const char *this = NULL; local [all...] |
/external/libpng/contrib/libtests/ |
H A D | pngunknown.c | 24 /* Define the following to use this test against your installed libpng, rather 33 /* Since this program tests the ability to change the unknown chunk handling 137 # define this not_the_cpp_this macro 426 /* During initialization and if this is a single command line argument set 540 /* Also store information about this chunk in the display, the relevant flag 621 /* Otherwise this will return the cached values set by any user callback */ 633 /* The #defines above should mean this is never reached, it's just here as 636 # error No store support and no user chunk support, this will not work 660 /* Terminate here, this error is not test specific. */ 722 * in this cas [all...] |
/external/linux-tools-perf/perf-3.12.0/tools/perf/ |
H A D | builtin-kmem.c | 432 struct alloc_stat *this; local 435 this = rb_entry(*new, struct alloc_stat, node); 439 cmp = sort->cmp(data, this);
|
/external/qemu/distrib/sdl-1.2.15/src/video/ |
H A D | SDL_video.c | 16 License along with this library; if not, write to the Free Software 140 void SDL_GL_UpdateRectsLock(SDL_VideoDevice* this, int numrects, SDL_Rect* rects); 334 SDL_VideoDevice *this = current_video; local 342 modes = video->ListModes(this, format, flags); 351 * given width and height. If this bits-per-pixel is different from the 398 /* No sizes supported at this bit-depth */ 402 /* Any size supported at this bit-depth */ 409 supported = 1; /* this mode can fit the centered window. */ 472 /* No sizes supported at this bit-depth */ 585 SDL_VideoDevice *video, *this; local 1041 SDL_VideoDevice *this = current_video; local 1148 SDL_VideoDevice *this = current_video; local 1350 SDL_VideoDevice *this = current_video; local 1412 SDL_VideoDevice *this = current_video; local 1431 SDL_VideoDevice *this = current_video; local 1519 SDL_VideoDevice* this = current_video; local 1534 SDL_VideoDevice *this = current_video; local 1544 SDL_GL_UpdateRectsLock(SDL_VideoDevice* this, int numrects, SDL_Rect *rects) argument 1555 SDL_VideoDevice *this = current_video; local 1632 SDL_VideoDevice *this = current_video; local 1680 SDL_VideoDevice *this = current_video; local 1702 SDL_VideoDevice *this = current_video; local 1805 SDL_VideoDevice *this = current_video; local 1838 SDL_VideoDevice *this = current_video; local 1925 SDL_VideoDevice *this = current_video; local 1941 SDL_VideoDevice *this = current_video; local 2034 SDL_VideoDevice *this = current_video; local [all...] |
/external/qemu/distrib/sdl-1.2.15/src/video/windx5/ |
H A D | SDL_dx5video.c | 16 License along with this library; if not, write to the Free Software 554 static void DX5_DeleteDevice(SDL_VideoDevice *this) argument 561 if ( this ) { 562 if ( this->hidden ) { 563 SDL_free(this->hidden); 565 if ( this->gl_data ) { 566 SDL_free(this->gl_data); 568 SDL_free(this); 669 SDL_VideoDevice *this = (SDL_VideoDevice *)udata; local 872 this [all...] |
/external/svox/pico/lib/ |
H A D | picodata.c | 5 * you may not use this file except in compliance with the License. 51 typedef pico_status_t (* picodata_cbPutItemMethod) (register picodata_CharBuffer this, 55 typedef pico_status_t (* picodata_cbGetItemMethod) (register picodata_CharBuffer this, 59 typedef pico_status_t (* picodata_cbSubResetMethod) (register picodata_CharBuffer this); 60 typedef pico_status_t (* picodata_cbSubDeallocateMethod) (register picodata_CharBuffer this, picoos_MemoryManager mm); 81 static pico_status_t data_cbPutItem(register picodata_CharBuffer this, 85 static pico_status_t data_cbGetItem(register picodata_CharBuffer this, 89 pico_status_t picodata_cbReset(register picodata_CharBuffer this) argument 91 this->rear = 0; 92 this 106 picodata_CharBuffer this; local 132 picodata_disposeCharBuffer(picoos_MemoryManager mm, picodata_CharBuffer *this) argument 145 picodata_cbPutCh(register picodata_CharBuffer this, picoos_char ch) argument 159 picodata_cbGetCh(register picodata_CharBuffer this) argument 176 data_cbGetItem(register picodata_CharBuffer this, picoos_uint8 *buf, const picoos_uint16 blenmax, picoos_uint16 *blen, const picoos_uint8 issd) argument 261 data_cbPutItem(register picodata_CharBuffer this, const picoos_uint8 *buf, const picoos_uint16 blenmax, picoos_uint16 *blen) argument 321 picodata_cbGetItem(register picodata_CharBuffer this, picoos_uint8 *buf, const picoos_uint16 blenmax, picoos_uint16 *blen) argument 328 picodata_cbGetSpeechData(register picodata_CharBuffer this, picoos_uint8 *buf, const picoos_uint16 blenmax, picoos_uint16 *blen) argument 337 picodata_cbPutItem(register picodata_CharBuffer this, const picoos_uint8 *buf, const picoos_uint16 blenmax, picoos_uint16 *blen) argument 346 picodata_cbGetFrontItemType(register picodata_CharBuffer this) argument 577 puSimpleInitialize(register picodata_ProcessingUnit this, picoos_int32 resetMode) argument 581 puSimpleTerminate(register picodata_ProcessingUnit this) argument 585 puSimpleStep(register picodata_ProcessingUnit this, picoos_int16 mode, picoos_uint16 * numBytesOutput) argument 614 picodata_ProcessingUnit this = (picodata_ProcessingUnit) picoos_allocate(mm, sizeof(*this)); local 631 picodata_disposeProcessingUnit( picoos_MemoryManager mm, picodata_ProcessingUnit * this) argument 646 picodata_getCbIn(picodata_ProcessingUnit this) argument 656 picodata_getCbOut(picodata_ProcessingUnit this) argument 666 picodata_setCbIn(picodata_ProcessingUnit this, picodata_CharBuffer cbIn) argument 678 picodata_setCbOut(picodata_ProcessingUnit this, picodata_CharBuffer cbOut) argument [all...] |
H A D | picokpr.c | 5 * you may not use this file except in compliance with the License. 169 static pico_status_t kprInitialize(register picoknow_KnowledgeBase this, argument 177 if (NULL == this || NULL == this->subObj) { 181 kpr = (kpr_subobj_t *) this->subObj; 183 kpr->rStrArrLen = kpr_getUInt32(&(this->base[KPR_STRARRLEN_OFFSET])); 184 kpr->rLexCatArrLen = kpr_getUInt32(&(this->base[KPR_LEXCATARRLEN_OFFSET])); 185 kpr->rAttrValArrLen = kpr_getUInt32(&(this->base[KPR_ATTRVALARRLEN_OFFSET])); 186 kpr->rOutItemArrLen = kpr_getUInt32(&(this->base[KPR_OUTITEMARRLEN_OFFSET])); 187 kpr->rTokArrLen = kpr_getUInt32(&(this 226 kprSubObjDeallocate(register picoknow_KnowledgeBase this, picoos_MemoryManager mm) argument 240 picokpr_specializePreprocKnowledgeBase(picoknow_KnowledgeBase this, picoos_Common common) argument 260 picokpr_getPreproc(picoknow_KnowledgeBase this) argument [all...] |
H A D | picoktab.c | 5 * you may not use this file except in compliance with the License. 65 static pico_status_t ktabIdsInitialize(register picoknow_KnowledgeBase this, argument 72 if (NULL == this || NULL == this->subObj) { 76 ids = (picoktab_FixedIds) this->subObj; 84 static pico_status_t ktabIdsSubObjDeallocate(register picoknow_KnowledgeBase this, argument 87 if (NULL != this) { 88 picoos_deallocate(mm, (void *) &this->subObj); 93 pico_status_t picoktab_specializeIdsKnowledgeBase(picoknow_KnowledgeBase this, argument 96 if (NULL == this) { 109 picoktab_getFixedIds(picoknow_KnowledgeBase this) argument 117 picoktab_FixedIds this = (picoktab_FixedIds) picoos_allocate(mm,sizeof(*this)); local 125 picoktab_disposeFixedIds(picoos_MemoryManager mm, picoktab_FixedIds * this) argument 204 ktabGraphsInitialize(register picoknow_KnowledgeBase this, picoos_Common common) argument 222 ktabGraphsSubObjDeallocate(register picoknow_KnowledgeBase this, picoos_MemoryManager mm) argument 231 picoktab_specializeGraphsKnowledgeBase(picoknow_KnowledgeBase this, picoos_Common common) argument 247 picoktab_getGraphs(picoknow_KnowledgeBase this) argument 258 picoktab_hasVowellikeProp(const picoktab_Graphs this, const picoos_uint8 *graph, const picoos_uint8 graphlenmax) argument 273 ktab_getStrProp(const picoktab_Graphs this, picoos_uint32 graphsOffset, picoos_uint32 propOffset, picoos_uchar * str) argument 288 ktab_propOffset(const picoktab_Graphs this, picoos_uint32 graphsOffset, picoos_uint32 prop) argument 369 picoktab_graphOffset(const picoktab_Graphs this, picoos_uchar * utf8graph) argument 431 picoktab_getIntPropTokenType(const picoktab_Graphs this, picoos_uint32 graphsOffset, picoos_uint8 * stokenType) argument 447 picoktab_getIntPropTokenSubType(const picoktab_Graphs this, picoos_uint32 graphsOffset, picoos_int8 * stokenSubType) argument 462 picoktab_getIntPropValue(const picoktab_Graphs this, picoos_uint32 graphsOffset, picoos_uint32 * value) argument 478 picoktab_getIntPropPunct(const picoktab_Graphs this, picoos_uint32 graphsOffset, picoos_uint8 * info1, picoos_uint8 * info2) argument 511 picoktab_getStrPropLowercase(const picoktab_Graphs this, picoos_uint32 graphsOffset, picoos_uchar * lowercase) argument 526 picoktab_getStrPropGraphsubs1(const picoktab_Graphs this, picoos_uint32 graphsOffset, picoos_uchar * graphsubs1) argument 541 picoktab_getStrPropGraphsubs2(const picoktab_Graphs this, picoos_uint32 graphsOffset, picoos_uchar * graphsubs2) argument 568 picoktab_graphsGetNumEntries(const picoktab_Graphs this) argument 574 picoktab_graphsGetGraphInfo(const picoktab_Graphs this, picoos_uint16 graphIndex, picoos_uchar * from, picoos_uchar * to, picoos_uint8 * propset, picoos_uint8 * stokenType, picoos_uint8 * stokenSubType, picoos_uint8 * value, picoos_uchar * lowercase, picoos_uchar * graphsubs1, picoos_uchar * graphsubs2, picoos_uint8 * punct) argument 695 ktabPhonesInitialize(register picoknow_KnowledgeBase this, picoos_Common common) argument 711 ktabPhonesSubObjDeallocate(register picoknow_KnowledgeBase this, picoos_MemoryManager mm) argument 719 picoktab_specializePhonesKnowledgeBase(picoknow_KnowledgeBase this, picoos_Common common) argument 734 picoktab_getPhones(picoknow_KnowledgeBase this) argument 745 picoktab_hasVowelProp(const picoktab_Phones this, const picoos_uint8 ch) argument 749 picoktab_hasDiphthProp(const picoktab_Phones this, const picoos_uint8 ch) argument 753 picoktab_hasGlottProp(const picoktab_Phones this, const picoos_uint8 ch) argument 757 picoktab_hasNonsyllvowelProp(const picoktab_Phones this, const picoos_uint8 ch) argument 761 picoktab_hasSyllconsProp(const picoktab_Phones this, const picoos_uint8 ch) argument 766 picoktab_isSyllCarrier(const picoktab_Phones this, const picoos_uint8 ch) argument 775 picoktab_isPrimstress(const picoktab_Phones this, const picoos_uint8 ch) argument 779 picoktab_isSecstress(const picoktab_Phones this, const picoos_uint8 ch) argument 783 picoktab_isSyllbound(const picoktab_Phones this, const picoos_uint8 ch) argument 787 picoktab_isWordbound(const picoktab_Phones this, const picoos_uint8 ch) argument 791 picoktab_isPause(const picoktab_Phones this, const picoos_uint8 ch) argument 796 picoktab_getPrimstressID(const picoktab_Phones this) argument 799 picoktab_getSecstressID(const picoktab_Phones this) argument 802 picoktab_getSyllboundID(const picoktab_Phones this) argument 805 picoktab_getWordboundID(const picoktab_Phones this) argument 808 picoktab_getPauseID(const picoktab_Phones this) argument 887 ktabPosInitialize(register picoknow_KnowledgeBase this, picoos_Common common) argument 931 ktabPosSubObjDeallocate(register picoknow_KnowledgeBase this, picoos_MemoryManager mm) argument 939 picoktab_specializePosKnowledgeBase(picoknow_KnowledgeBase this, picoos_Common common) argument 954 picoktab_getPos(picoknow_KnowledgeBase this) argument 992 picoktab_isUniquePos(const picoktab_Pos this, const picoos_uint8 pos) argument 1011 picoktab_isPartOfPosGroup(const picoktab_Pos this, const picoos_uint8 pos, const picoos_uint8 posgroup) argument 1073 picoktab_getPosGroup(const picoktab_Pos this, const picoos_uint8 *poslist, const picoos_uint8 poslistlen) argument [all...] |
H A D | picosa.c | 5 * you may not use this file except in compliance with the License. 153 all but the first will be treated as an (empty) phrase containing just this item. 154 If this (single) item is a flush, creation of SBEG is suppressed. 245 static pico_status_t saInitialize(register picodata_ProcessingUnit this, picoos_int32 resetMode) { argument 255 if (NULL == this || NULL == this->subObj) { 256 return picoos_emRaiseException(this->common->em, 259 sa = (sa_subobj_t *) this->subObj; 261 /* sa->common = this->common; */ 305 fst = picokfst_getFST(this 427 saTerminate(register picodata_ProcessingUnit this) argument 431 saSubObjDeallocate(register picodata_ProcessingUnit this, picoos_MemoryManager mm) argument 448 picodata_ProcessingUnit this; local 489 saPosDItemSeqGetPosRight(register picodata_ProcessingUnit this, register sa_subobj_t *sa, const picoos_uint16 ind, const picoos_uint16 top, picoos_uint16 *rightind) argument 511 saDisambPos(register picodata_ProcessingUnit this, register sa_subobj_t *sa) argument 698 saCopyItemContent1to2(register picodata_ProcessingUnit this, register sa_subobj_t *sa, picoos_uint16 ind) argument 733 saLexIndLookup(register picodata_ProcessingUnit this, register sa_subobj_t *sa, picoklex_Lex lex, picoos_uint16 ind) argument 791 saGetNrVowel(register picodata_ProcessingUnit this, register sa_subobj_t *sa, const picoos_uint8 *sInChar, const picoos_uint16 inLen, const picoos_uint8 inPos, picoos_uint8 *nVow, picoos_uint8 *nVord) argument 829 saDoG2P(register picodata_ProcessingUnit this, register sa_subobj_t *sa, const picoos_uint8 *graph, const picoos_uint8 graphlen, const picoos_uint8 pos, picoos_uint8 *phones, const picoos_uint16 phonesmaxlen, picoos_uint16 *plen) argument 1005 saGraphemeToPhoneme(register picodata_ProcessingUnit this, register sa_subobj_t *sa, picoos_uint16 ind) argument 1078 saExtractPhonemes(register picodata_ProcessingUnit this, register sa_subobj_t *sa, picoos_uint16 pos, picodata_itemhead_t* head, const picoos_uint8* content) argument 1188 saStep(register picodata_ProcessingUnit this, picoos_int16 mode, picoos_uint16 *numBytesOutput) argument [all...] |
H A D | picospho.c | 5 * you may not use this file except in compliance with the License. 109 * this is the first round of alignment, only inserting/deleting/modifying bounds, according to 116 * this is the second round of alignment, treating non-BOUND items 244 static pico_status_t sphoReset(register picodata_ProcessingUnit this) argument 249 if (NULL == this || NULL == this->subObj) { 250 return picoos_emRaiseException(this->common->em, 253 spho = (spho_subobj_t *) this->subObj; 289 static pico_status_t sphoInitialize(register picodata_ProcessingUnit this, picoos_int32 resetMode) argument 299 if (NULL == this || NUL 336 sphoTerminate(register picodata_ProcessingUnit this) argument 342 sphoSubObjDeallocate(register picodata_ProcessingUnit this, picoos_MemoryManager mm) argument 365 picodata_ProcessingUnit this = picodata_newProcessingUnit(mm, common, cbIn, cbOut, voice); local 523 sphoExtractPhonemes(register picodata_ProcessingUnit this, register spho_subobj_t *spho, picoos_uint16 pos, picoos_uint8 convertAccents, picoos_uint8 * suppressWB) argument 922 sphoStep(register picodata_ProcessingUnit this, picoos_int16 mode, picoos_uint16 * numBytesOutput) argument [all...] |
/external/valgrind/main/coregrind/m_debuginfo/ |
H A D | storage.c | 26 along with this program; if not, write to the Free Software 371 Addr this, 379 UWord size = next - this; 382 if (this == next) return; 387 filename, lineno, this, next ); 396 if (this > next) { 400 "at entry %d: 0x%lx 0x%lx\n", entry, this, next); 413 /* At this point, we know that the original value for |size|, viz 414 |next - this|, will only still be used in the case where 415 |this| < 368 addLineInfo( struct _DebugInfo* di, const HChar* filename, const HChar* dirname, Addr this, Addr next, Int lineno, Int entry ) argument [all...] |
/external/chromium_org/third_party/WebKit/PerformanceTests/SunSpider/tests/parse-only/ |
H A D | mootools-1.2.2-core-nc.js | 56 if ((a1 = this.prototype[a1])) return add(this, a2, a1, a3); 58 for (var a in a1) this.alias(a, a1[a], a2); 59 return this; 63 if (typeof a1 == 'string') return add(this, a1, a2, a3); 64 for (var p in a1) add(this, p, a1[p], a2); 65 return this; 112 for (var key in object) this[key] = object[key]; 113 return this; 121 for (var key in this){ [all...] |
/external/blktrace/btt/ |
H A D | output.c | 17 * along with this program; if not, write to the Free Software 331 struct seek_mode_info *p, *this, *new_list = NULL; local 333 while ((this = sip->head) != NULL) { 334 sip->head = this->next; 335 this->next = NULL; 337 if (new_list == NULL || this->nseeks > new_list->nseeks) 338 new_list = this; 339 else if (this->nseeks == new_list->nseeks) { 341 if (p->mode == this->mode) 345 this [all...] |
/external/chromium_org/extensions/renderer/resources/ |
H A D | web_view.js | 2 // Use of this source code is governed by a BSD-style license that can be 13 // TODO(lazyboy): Rename this to WebViewInternal and call WebViewInternal 41 this.validPartitionId = true; 42 this.persistStorage = false; 43 this.storagePartitionId = ''; 47 if (!this.validPartitionId) { 50 return (this.persistStorage ? 'persist:' : '') + this.storagePartitionId; 67 this.validPartitionId = false; 71 this [all...] |
/external/chromium_org/third_party/polymer/components/polymer/ |
H A D | polymer.js | 11 window.PolymerGestures={},function(a){var b=!1,c=document.createElement("meta");if(c.createShadowRoot){var d=c.createShadowRoot(),e=document.createElement("span");d.appendChild(e),c.addEventListener("testpath",function(a){a.path&&(b=a.path[0]===e),a.stopPropagation()});var f=new CustomEvent("testpath",{bubbles:!0});document.head.appendChild(c),e.dispatchEvent(f),c.parentNode.removeChild(c),d=e=null}c=null;var g={shadow:function(a){return a?a.shadowRoot||a.webkitShadowRoot:void 0},canTarget:function(a){return a&&Boolean(a.elementFromPoint)},targetingShadow:function(a){var b=this.shadow(a);return this.canTarget(b)?b:void 0},olderShadow:function(a){var b=a.olderShadowRoot;if(!b){var c=a.querySelector("shadow");c&&(b=c.olderShadowRoot)}return b},allShadows:function(a){for(var b=[],c=this.shadow(a);c;)b.push(c),c=this.olderShadow(c);return b},searchRoot:function(a,b,c){var d,e;return a?(d=a.elementFromPoint(b,c),d?e=this.targetingShadow(d):a!==document&&(e=this.olderShadow(a)),this.searchRoot(e,b,c)||d):void 0},owner:function(a){if(!a)return document;for(var b=a;b.parentNode;)b=b.parentNode;return b.nodeType!=Node.DOCUMENT_NODE&&b.nodeType!=Node.DOCUMENT_FRAGMENT_NODE&&(b=document),b},findTarget:function(a){if(b&&a.path)return a.path[0];var c=a.clientX,d=a.clientY,e=this.owner(a.target);return e.elementFromPoint(c,d)||(e=document),this.searchRoot(e,c,d)},findTouchAction:function(a){var c;if(b&&a.path){for(var d=a.path,e=0;e<d.length;e++)if(c=d[e],c.nodeType===Node.ELEMENT_NODE&&c.hasAttribute("touch-action"))return c.getAttribute("touch-action")}else for(c=a.target;c;){if(c.hasAttribute("touch-action"))return c.getAttribute("touch-action");c=c.parentNode||c.host}return"auto"},LCA:function(a,b){if(a===b)return a;if(a&&!b)return a;if(b&&!a)return b;if(!b&&!a)return document;if(a.contains&&a.contains(b))return a;if(b.contains&&b.contains(a))return b;var c=this [all...] |
/external/chromium_org/third_party/polymer/components-chromium/polymer/ |
H A D | polymer.js | 11 window.PolymerGestures={},function(a){var b=!1,c=document.createElement("meta");if(c.createShadowRoot){var d=c.createShadowRoot(),e=document.createElement("span");d.appendChild(e),c.addEventListener("testpath",function(a){a.path&&(b=a.path[0]===e),a.stopPropagation()});var f=new CustomEvent("testpath",{bubbles:!0});document.head.appendChild(c),e.dispatchEvent(f),c.parentNode.removeChild(c),d=e=null}c=null;var g={shadow:function(a){return a?a.shadowRoot||a.webkitShadowRoot:void 0},canTarget:function(a){return a&&Boolean(a.elementFromPoint)},targetingShadow:function(a){var b=this.shadow(a);return this.canTarget(b)?b:void 0},olderShadow:function(a){var b=a.olderShadowRoot;if(!b){var c=a.querySelector("shadow");c&&(b=c.olderShadowRoot)}return b},allShadows:function(a){for(var b=[],c=this.shadow(a);c;)b.push(c),c=this.olderShadow(c);return b},searchRoot:function(a,b,c){var d,e;return a?(d=a.elementFromPoint(b,c),d?e=this.targetingShadow(d):a!==document&&(e=this.olderShadow(a)),this.searchRoot(e,b,c)||d):void 0},owner:function(a){if(!a)return document;for(var b=a;b.parentNode;)b=b.parentNode;return b.nodeType!=Node.DOCUMENT_NODE&&b.nodeType!=Node.DOCUMENT_FRAGMENT_NODE&&(b=document),b},findTarget:function(a){if(b&&a.path)return a.path[0];var c=a.clientX,d=a.clientY,e=this.owner(a.target);return e.elementFromPoint(c,d)||(e=document),this.searchRoot(e,c,d)},findTouchAction:function(a){var c;if(b&&a.path){for(var d=a.path,e=0;e<d.length;e++)if(c=d[e],c.nodeType===Node.ELEMENT_NODE&&c.hasAttribute("touch-action"))return c.getAttribute("touch-action")}else for(c=a.target;c;){if(c.hasAttribute("touch-action"))return c.getAttribute("touch-action");c=c.parentNode||c.host}return"auto"},LCA:function(a,b){if(a===b)return a;if(a&&!b)return a;if(b&&!a)return b;if(!b&&!a)return document;if(a.contains&&a.contains(b))return a;if(b.contains&&b.contains(a))return b;var c=this [all...] |
/external/chromium_org/third_party/skia/src/utils/ |
H A D | SkTextureCompressor_ASTC.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 20 // The weight value corresponds to the amount that this index contributes to the final 24 // The algorithm is something like this: 273 // Enable this to assert whenever a decoded block has invalid ASTC values. Otherwise, 278 // documented at this site: 309 const uint64_t newLow = reverse64(this->fHigh); 310 this->fHigh = reverse64(this->fLow); 311 this->fLow = newLow; 470 // If isRGB is true, then treat this a 596 SkASSERT(nBits < 8); m[0] = static_cast<int>(blockBits(nBits - 1, 0)); m[1] = static_cast<int>(blockBits(2*nBits - 1 + 2, nBits + 2)); m[2] = static_cast<int>(blockBits(3*nBits - 1 + 4, 2*nBits + 4)); m[3] = static_cast<int>(blockBits(4*nBits - 1 + 5, 3*nBits + 5)); m[4] = static_cast<int>(blockBits(5*nBits - 1 + 7, 4*nBits + 7)); } int T = static_cast<int>(blockBits(nBits + 1, nBits)) | (static_cast<int>(blockBits(2*nBits + 2 + 1, 2*nBits + 2)) << 2) | (static_cast<int>(blockBits[3*nBits + 4] << 4)) | (static_cast<int>(blockBits(4*nBits + 5 + 1, 4*nBits + 5)) << 5) | (static_cast<int>(blockBits[5*nBits + 7] << 7)); int t[5]; int C; SkTBits<int> Tbits(T); if (0x7 == Tbits(4, 2)) { C = (Tbits(7, 5) << 2) | Tbits(1, 0); t[3] = t[4] = 2; } else { C = Tbits(4, 0); if (Tbits(6, 5) == 0x3) { t[4] = 2; t[3] = Tbits[7]; } else { t[4] = Tbits[7]; t[3] = Tbits(6, 5); } } SkTBits<int> Cbits(C); if (Cbits(1, 0) == 0x3) { t[2] = 2; t[1] = Cbits[4]; t[0] = (Cbits[3] << 1) | (Cbits[2] & (0x1 & ~(Cbits[3]))); } else if (Cbits(3, 2) == 0x3) { t[2] = 2; t[1] = 2; t[0] = Cbits(1, 0); } else { t[2] = Cbits[4]; t[1] = Cbits(3, 2); t[0] = (Cbits[1] << 1) | (Cbits[0] & (0x1 & ~(Cbits[1]))); } for (int i = 0; i < 5; ++i) { SkASSERT(t[i] < 3); SkASSERT(m[i] < (1 << nBits)); } for (int i = 0; i < 5; ++i) { *dst = (t[i] << nBits) + m[i]; ++dst; } } static void decode_quint_block(int* dst, int nBits, const uint64_t &block) { SkTBits<uint64_t> blockBits(block); int m[3]; if (0 == nBits) { memset(m, 0, sizeof(m)); } else { SkASSERT(nBits < 8); m[0] = static_cast<int>(blockBits(nBits - 1, 0)); m[1] = static_cast<int>(blockBits(2*nBits - 1 + 3, nBits + 3)); m[2] = static_cast<int>(blockBits(3*nBits - 1 + 5, 2*nBits + 5)); } int Q = static_cast<int>(blockBits(nBits + 2, nBits)) | (static_cast<int>(blockBits(2*nBits + 3 + 1, 2*nBits + 3)) << 3) | (static_cast<int>(blockBits(3*nBits + 5 + 1, 3*nBits + 5)) << 5); int q[3]; SkTBits<int> Qbits(Q); if (Qbits(2, 1) == 0x3 && Qbits(6, 5) == 0) { const int notBitZero = (0x1 & ~(Qbits[0])); q[2] = (Qbits[0] << 2) | ((Qbits[4] & notBitZero) << 1) | (Qbits[3] & notBitZero); q[1] = 4; q[0] = 4; } else { int C; if (Qbits(2, 1) == 0x3) { q[2] = 4; C = (Qbits(4, 3) << 3) | ((0x3 & ~(Qbits(6, 5))) << 1) | Qbits[0]; } else { q[2] = Qbits(6, 5); C = Qbits(4, 0); } SkTBits<int> Cbits(C); if (Cbits(2, 0) == 0x5) { q[1] = 4; q[0] = Cbits(4, 3); } else { q[1] = Cbits(4, 3); q[0] = Cbits(2, 0); } } for (int i = 0; i < 3; ++i) { SkASSERT(q[i] < 5); SkASSERT(m[i] < (1 << nBits)); } for (int i = 0; i < 3; ++i) { *dst = (q[i] << nBits) + m[i]; ++dst; } } static bool decode_integer_sequence( int* dst, int dstSize, int nVals, const ASTCBlock &block, int startBit, int endBit, bool bReadForward, int nBits, int nTrits, int nQuints ) { if (nVals > dstSize) { return false; } ASTCBlock src = block; if (!bReadForward) { src.reverse(); startBit = 128 - startBit; endBit = 128 - endBit; } while (nVals > 0) { if (nTrits > 0) { SkASSERT(0 == nQuints); int endBlockBit = startBit + 8 + 5*nBits; if (endBlockBit > endBit) { endBlockBit = endBit; } int trits[5]; decode_trit_block(trits, nBits, read_astc_bits(src, startBit, endBlockBit)); memcpy(dst, trits, SkMin32(nVals, 5)*sizeof(int)); dst += 5; nVals -= 5; startBit = endBlockBit; } else if (nQuints > 0) { SkASSERT(0 == nTrits); int endBlockBit = startBit + 7 + 3*nBits; if (endBlockBit > endBit) { endBlockBit = endBit; } int quints[3]; decode_quint_block(quints, nBits, read_astc_bits(src, startBit, endBlockBit)); memcpy(dst, quints, SkMin32(nVals, 3)*sizeof(int)); dst += 3; nVals -= 3; startBit = endBlockBit; } else { int endValBit = startBit + nBits; if (endValBit > endBit) { endValBit = endBit; } SkASSERT(endValBit - startBit < 31); *dst = static_cast<int>(read_astc_bits(src, startBit, endValBit)); ++dst; --nVals; startBit = endValBit; } } return true; } static inline int unquantize_value(unsigned mask, int A, int B, int C, int D) { int T = D * C + B; T = T ^ A; T = (A & mask) | (T >> 2); SkASSERT(T < 256); return T; } static inline int replicate_bits(int x, int oldPrec, int prec) { while (oldPrec < prec) { const int toShift = SkMin32(prec-oldPrec, oldPrec); x = (x << toShift) | (x >> (oldPrec - toShift)); oldPrec += toShift; } SkASSERT((-(1 << prec) & x) == 0); return x; } static inline int unquantize_bits_color(int val, int nBits) { return replicate_bits(val, nBits, 8); } static inline int unquantize_trit_color(int val, int nBits) { SkASSERT(nBits > 0); SkASSERT(nBits < 7); const int D = (val >> nBits) & 0x3; SkASSERT(D < 3); const int A = -(val & 0x1) & 0x1FF; static const int Cvals[6] = { 204, 93, 44, 22, 11, 5 }; const int C = Cvals[nBits - 1]; int B = 0; const SkTBits<int> valBits(val); switch (nBits) { case 1: B = 0; break; case 2: { const int b = valBits[1]; B = (b << 1) | (b << 2) | (b << 4) | (b << 8); } break; case 3: { const int cb = valBits(2, 1); B = cb | (cb << 2) | (cb << 7); } break; case 4: { const int dcb = valBits(3, 1); B = dcb | (dcb << 6); } break; case 5: { const int edcb = valBits(4, 1); B = (edcb << 5) | (edcb >> 2); } break; case 6: { const int fedcb = valBits(5, 1); B = (fedcb << 4) | (fedcb >> 4); } break; } return unquantize_value(0x80, A, B, C, D); } static inline int unquantize_quint_color(int val, int nBits) { const int D = (val >> nBits) & 0x7; SkASSERT(D < 5); const int A = -(val & 0x1) & 0x1FF; static const int Cvals[5] = { 113, 54, 26, 13, 6 }; SkASSERT(nBits > 0); SkASSERT(nBits < 6); const int C = Cvals[nBits - 1]; int B = 0; const SkTBits<int> valBits(val); switch (nBits) { case 1: B = 0; break; case 2: { const int b = valBits[1]; B = (b << 2) | (b << 3) | (b << 8); } break; case 3: { const int cb = valBits(2, 1); B = (cb >> 1) | (cb << 1) | (cb << 7); } break; case 4: { const int dcb = valBits(3, 1); B = (dcb >> 1) | (dcb << 6); } break; case 5: { const int edcb = valBits(4, 1); B = (edcb << 5) | (edcb >> 3); } break; } return unquantize_value(0x80, A, B, C, D); } static void unquantize_colors(int *vals, int nVals, int nBits, int nTrits, int nQuints) { for (int i = 0; i < nVals; ++i) { if (nTrits > 0) { SkASSERT(nQuints == 0); vals[i] = unquantize_trit_color(vals[i], nBits); } else if (nQuints > 0) { SkASSERT(nTrits == 0); vals[i] = unquantize_quint_color(vals[i], nBits); } else { SkASSERT(nQuints == 0 && nTrits == 0); vals[i] = unquantize_bits_color(vals[i], nBits); } } } static int interpolate_channel(int c0, int c1, int weight) { SkASSERT(0 <= c0 && c0 < 256); SkASSERT(0 <= c1 && c1 < 256); c0 = (c0 << 8) | c0; c1 = (c1 << 8) | c1; const int result = ((c0*(64 - weight) + c1*weight + 32) / 64) >> 8; if (result > 255) { return 255; } SkASSERT(result >= 0); return result; } static SkColor interpolate_endpoints(const SkColor endpoints[2], int weight) { return SkColorSetARGB( interpolate_channel(SkColorGetA(endpoints[0]), SkColorGetA(endpoints[1]), weight), interpolate_channel(SkColorGetR(endpoints[0]), SkColorGetR(endpoints[1]), weight), interpolate_channel(SkColorGetG(endpoints[0]), SkColorGetG(endpoints[1]), weight), interpolate_channel(SkColorGetB(endpoints[0]), SkColorGetB(endpoints[1]), weight)); } static SkColor interpolate_dual_endpoints( const SkColor endpoints[2], int weight0, int weight1, int plane) { int a = interpolate_channel(SkColorGetA(endpoints[0]), SkColorGetA(endpoints[1]), weight0); int r = interpolate_channel(SkColorGetR(endpoints[0]), SkColorGetR(endpoints[1]), weight0); int g = interpolate_channel(SkColorGetG(endpoints[0]), SkColorGetG(endpoints[1]), weight0); int b = interpolate_channel(SkColorGetB(endpoints[0]), SkColorGetB(endpoints[1]), weight0); switch (plane) { case 0: r = interpolate_channel( SkColorGetR(endpoints[0]), SkColorGetR(endpoints[1]), weight1); break; case 1: g = interpolate_channel( SkColorGetG(endpoints[0]), SkColorGetG(endpoints[1]), weight1); break; case 2: b = interpolate_channel( SkColorGetB(endpoints[0]), SkColorGetB(endpoints[1]), weight1); break; case 3: a = interpolate_channel( SkColorGetA(endpoints[0]), SkColorGetA(endpoints[1]), weight1); break; default: SkDEBUGFAIL(�); break; } return SkColorSetARGB(a, r, g, b); } struct ASTCDecompressionData { ASTCDecompressionData(int dimX, int dimY) : fDimX(dimX), fDimY(dimY) { } const int fDimX; const int fDimY; ASTCBlock fBlock; int fBlockMode; bool fDualPlaneEnabled; int fDualPlane; bool fVoidExtent; bool fError; int fWeightDimX; int fWeightDimY; int fWeightBits; int fWeightTrits; int fWeightQuints; int fPartCount; int fPartIndex; enum ColorEndpointMode { kLDR_Luminance_Direct_ColorEndpointMode = 0, kLDR_Luminance_BaseOffset_ColorEndpointMode = 1, kHDR_Luminance_LargeRange_ColorEndpointMode = 2, kHDR_Luminance_SmallRange_ColorEndpointMode = 3, kLDR_LuminanceAlpha_Direct_ColorEndpointMode = 4, kLDR_LuminanceAlpha_BaseOffset_ColorEndpointMode = 5, kLDR_RGB_BaseScale_ColorEndpointMode = 6, kHDR_RGB_BaseScale_ColorEndpointMode = 7, kLDR_RGB_Direct_ColorEndpointMode = 8, kLDR_RGB_BaseOffset_ColorEndpointMode = 9, kLDR_RGB_BaseScaleWithAlpha_ColorEndpointMode = 10, kHDR_RGB_ColorEndpointMode = 11, kLDR_RGBA_Direct_ColorEndpointMode = 12, kLDR_RGBA_BaseOffset_ColorEndpointMode = 13, kHDR_RGB_LDRAlpha_ColorEndpointMode = 14, kHDR_RGB_HDRAlpha_ColorEndpointMode = 15 }; static const int kMaxColorEndpointModes = 16; static const int kMaxPartitions = 4; ColorEndpointMode fCEM[kMaxPartitions]; int fColorStartBit; int fColorEndBit; int numPartitions() const { return fPartCount; } int numWeights() const { return fWeightDimX * fWeightDimY * (fDualPlaneEnabled ? 2 : 1); } int maxWeightValue() const { int maxVal = (1 << fWeightBits); if (fWeightTrits > 0) { SkASSERT(0 == fWeightQuints); maxVal *= 3; } else if (fWeightQuints > 0) { SkASSERT(0 == fWeightTrits); maxVal *= 5; } return maxVal - 1; } int numWeightBits() const { const int nWeights = this->numWeights(); return ((nWeights*8*fWeightTrits + 4) / 5) + ((nWeights*7*fWeightQuints + 2) / 3) + (nWeights*fWeightBits); } int numColorValues() const { int numValues = 0; for (int i = 0; i < this->numPartitions(); ++i) { int cemInt = static_cast<int>(fCEM[i]); numValues += ((cemInt >> 2) + 1) * 2; } return numValues; } bool getColorValueEncoding(int *nBits, int *nTrits, int *nQuints) const { if (NULL == nBits || NULL == nTrits || NULL == nQuints) { return false; } const int nColorVals = this->numColorValues(); if (nColorVals <= 0) { return false; } const int colorBits = fColorEndBit - fColorStartBit; SkASSERT(colorBits > 0); if (colorBits < ((13 * nColorVals + 4) / 5)) { return false; } for (int i = 255; i > 0; --i) { int range = i + 1; int bits = 0, trits = 0, quints = 0; bool valid = false; if (SkIsPow2(range)) { bits = bits_for_range(range); valid = true; } else if ((range % 3) == 0 && SkIsPow2(range/3)) { trits = 1; bits = bits_for_range(range/3); valid = true; } else if ((range % 5) == 0 && SkIsPow2(range/5)) { quints = 1; bits = bits_for_range(range/5); valid = true; } if (valid) { const int actualColorBits = ((nColorVals*8*trits + 4) / 5) + ((nColorVals*7*quints + 2) / 3) + (nColorVals*bits); if (actualColorBits <= colorBits) { *nTrits = trits; *nQuints = quints; *nBits = bits; return true; } } } return false; } void colorEndpoints(SkColor endpoints[4][2], const int* colorValues) const { for (int i = 0; i < this->numPartitions(); ++i) { switch (fCEM[i]) { case kLDR_Luminance_Direct_ColorEndpointMode: { const int* v = colorValues; endpoints[i][0] = SkColorSetARGB(0xFF, v[0], v[0], v[0]); endpoints[i][1] = SkColorSetARGB(0xFF, v[1], v[1], v[1]); colorValues += 2; } break; case kLDR_Luminance_BaseOffset_ColorEndpointMode: { const int* v = colorValues; const int L0 = (v[0] >> 2) | (v[1] & 0xC0); const int L1 = clamp_byte(L0 + (v[1] & 0x3F)); endpoints[i][0] = SkColorSetARGB(0xFF, L0, L0, L0); endpoints[i][1] = SkColorSetARGB(0xFF, L1, L1, L1); colorValues += 2; } break; case kLDR_LuminanceAlpha_Direct_ColorEndpointMode: { const int* v = colorValues; endpoints[i][0] = SkColorSetARGB(v[2], v[0], v[0], v[0]); endpoints[i][1] = SkColorSetARGB(v[3], v[1], v[1], v[1]); colorValues += 4; } break; case kLDR_LuminanceAlpha_BaseOffset_ColorEndpointMode: { int v0 = colorValues[0]; int v1 = colorValues[1]; int v2 = colorValues[2]; int v3 = colorValues[3]; bit_transfer_signed(&v1, &v0); bit_transfer_signed(&v3, &v2); endpoints[i][0] = SkColorSetARGB(v2, v0, v0, v0); endpoints[i][1] = SkColorSetARGB( clamp_byte(v3+v2), clamp_byte(v1+v0), clamp_byte(v1+v0), clamp_byte(v1+v0)); colorValues += 4; } break; case kLDR_RGB_BaseScale_ColorEndpointMode: { decode_rgba_basescale(colorValues, endpoints[i], true); colorValues += 4; } break; case kLDR_RGB_Direct_ColorEndpointMode: { decode_rgba_direct(colorValues, endpoints[i], true); colorValues += 6; } break; case kLDR_RGB_BaseOffset_ColorEndpointMode: { decode_rgba_baseoffset(colorValues, endpoints[i], true); colorValues += 6; } break; case kLDR_RGB_BaseScaleWithAlpha_ColorEndpointMode: { decode_rgba_basescale(colorValues, endpoints[i], false); colorValues += 6; } break; case kLDR_RGBA_Direct_ColorEndpointMode: { decode_rgba_direct(colorValues, endpoints[i], false); colorValues += 8; } break; case kLDR_RGBA_BaseOffset_ColorEndpointMode: { decode_rgba_baseoffset(colorValues, endpoints[i], false); colorValues += 8; } break; default: SkDEBUGFAIL(�); break; } } } int unquantizeWeight(int x) const { SkASSERT(x <= this->maxWeightValue()); const int D = (x >> fWeightBits) & 0x7; const int A = -(x & 0x1) & 0x7F; SkTBits<int> xbits(x); int T = 0; if (fWeightTrits > 0) { SkASSERT(0 == fWeightQuints); switch (fWeightBits) { case 0: { SkASSERT(x < 3); static const int kUnquantizationTable[3] = { 0, 32, 63 }; T = kUnquantizationTable[x]; } break; case 1: { const int B = 0; const int C = 50; T = unquantize_value(0x20, A, B, C, D); } break; case 2: { const int b = xbits[1]; const int B = b | (b << 2) | (b << 6); const int C = 23; T = unquantize_value(0x20, A, B, C, D); } break; case 3: { const int cb = xbits(2, 1); const int B = cb | (cb << 5); const int C = 11; T = unquantize_value(0x20, A, B, C, D); } break; default: SkDEBUGFAIL(�); break; } } else if (fWeightQuints > 0) { SkASSERT(0 == fWeightTrits); switch (fWeightBits) { case 0: { SkASSERT(x < 5); static const int kUnquantizationTable[5] = { 0, 16, 32, 47, 63 }; T = kUnquantizationTable[x]; } break; case 1: { const int B = 0; const int C = 28; T = unquantize_value(0x20, A, B, C, D); } break; case 2: { const int b = xbits[1]; const int B = (b << 1) | (b << 6); const int C = 13; T = unquantize_value(0x20, A, B, C, D); } break; default: SkDEBUGFAIL(�); break; } } else { SkASSERT(0 == fWeightTrits); SkASSERT(0 == fWeightQuints); T = replicate_bits(x, fWeightBits, 6); } SkASSERT(T <= 63); if (T > 32) { T += 1; } SkASSERT(T <= 64); return T; } int getWeight(const int* unquantizedWeights, int idx, bool dualPlane) const { const int maxIdx = (fDualPlaneEnabled ? 2 : 1) * fWeightDimX * fWeightDimY - 1; if (fDualPlaneEnabled) { const int effectiveIdx = 2*idx + (dualPlane ? 1 : 0); if (effectiveIdx > maxIdx) { return 0; } return unquantizedWeights[effectiveIdx]; } SkASSERT(!dualPlane); if (idx > maxIdx) { return 0; } else { return unquantizedWeights[idx]; } } int infillWeight(const int* unquantizedValues, int s, int t, bool dualPlane) const { const int Ds = (1024 + fDimX/2) / (fDimX - 1); const int Dt = (1024 + fDimY/2) / (fDimY - 1); const int cs = Ds * s; const int ct = Dt * t; const int gs = (cs*(fWeightDimX - 1) + 32) >> 6; const int gt = (ct*(fWeightDimY - 1) + 32) >> 6; const int js = gs >> 4; const int jt = gt >> 4; const int fs = gs & 0xF; const int ft = gt & 0xF; const int idx = js + jt*fWeightDimX; const int p00 = this->getWeight(unquantizedValues, idx, dualPlane); const int p01 = this->getWeight(unquantizedValues, idx + 1, dualPlane); const int p10 = this->getWeight(unquantizedValues, idx + fWeightDimX, dualPlane); const int p11 = this->getWeight(unquantizedValues, idx + fWeightDimX + 1, dualPlane); const int w11 = (fs*ft + 8) >> 4; const int w10 = ft - w11; const int w01 = fs - w11; const int w00 = 16 - fs - ft + w11; const int weight = (p00*w00 + p01*w01 + p10*w10 + p11*w11 + 8) >> 4; SkASSERT(weight <= 64); return weight; } void texelWeights(int texelWeights[2][12][12], const int* texelValues) const { int unquantizedValues[144*2]; SkASSERT(this->numWeights() <= 144*2); for (int j = 0; j < this->numWeights(); ++j) { unquantizedValues[j] = this->unquantizeWeight(texelValues[j]); } for (int y = 0; y < fDimY; ++y) { for (int x = 0; x < fDimX; ++x) { texelWeights[0][x][y] = this->infillWeight(unquantizedValues, x, y, false); if (fDualPlaneEnabled) { texelWeights[1][x][y] = this->infillWeight(unquantizedValues, x, y, true); } } } } int getPartition(int x, int y) const { const int partitionCount = this->numPartitions(); int seed = fPartIndex; if ((fDimX * fDimY) < 31) { x <<= 1; y <<= 1; } seed += (partitionCount - 1) * 1024; uint32_t p = seed; p ^= p >> 15; p -= p << 17; p += p << 7; p += p << 4; p ^= p >> 5; p += p << 16; p ^= p >> 7; p ^= p >> 3; p ^= p << 6; p ^= p >> 17; uint32_t rnum = p; uint8_t seed1 = rnum & 0xF; uint8_t seed2 = (rnum >> 4) & 0xF; uint8_t seed3 = (rnum >> 8) & 0xF; uint8_t seed4 = (rnum >> 12) & 0xF; uint8_t seed5 = (rnum >> 16) & 0xF; uint8_t seed6 = (rnum >> 20) & 0xF; uint8_t seed7 = (rnum >> 24) & 0xF; uint8_t seed8 = (rnum >> 28) & 0xF; uint8_t seed9 = (rnum >> 18) & 0xF; uint8_t seed10 = (rnum >> 22) & 0xF; uint8_t seed11 = (rnum >> 26) & 0xF; uint8_t seed12 = ((rnum >> 30) | (rnum << 2)) & 0xF; seed1 *= seed1; seed2 *= seed2; seed3 *= seed3; seed4 *= seed4; seed5 *= seed5; seed6 *= seed6; seed7 *= seed7; seed8 *= seed8; seed9 *= seed9; seed10 *= seed10; seed11 *= seed11; seed12 *= seed12; int sh1, sh2, sh3; if (0 != (seed & 1)) { sh1 = (0 != (seed & 2))? 4 : 5; sh2 = (partitionCount == 3)? 6 : 5; } else { sh1 = (partitionCount==3)? 6 : 5; sh2 = (0 != (seed & 2))? 4 : 5; } sh3 = (0 != (seed & 0x10))? sh1 : sh2; seed1 >>= sh1; seed2 >>= sh2; seed3 >>= sh1; seed4 >>= sh2; seed5 >>= sh1; seed6 >>= sh2; seed7 >>= sh1; seed8 >>= sh2; seed9 >>= sh3; seed10 >>= sh3; seed11 >>= sh3; seed12 >>= sh3; const int z = 0; int a = seed1*x + seed2*y + seed11*z + (rnum >> 14); int b = seed3*x + seed4*y + seed12*z + (rnum >> 10); int c = seed5*x + seed6*y + seed9 *z + (rnum >> 6); int d = seed7*x + seed8*y + seed10*z + (rnum >> 2); a &= 0x3F; b &= 0x3F; c &= 0x3F; d &= 0x3F; if (partitionCount < 4) { d = 0; } if (partitionCount < 3) { c = 0; } if (a >= b && a >= c && a >= d) argument [all...] |
/external/chromium_org/ui/file_manager/gallery/js/image_editor/ |
H A D | image_editor.js | 2 // Use of this source code is governed by a BSD-style license that can be 24 this.rootContainer_ = DOMContainers.root; 25 this.container_ = DOMContainers.image; 26 this.modes_ = modes; 27 this.displayStringFunction_ = displayStringFunction; 28 this.onToolsVisibilityChanged_ = onToolsVisibilityChanged; 30 ImageUtil.removeChildren(this.container_); 32 this.viewport_ = viewport; 33 this.viewport_.setScreenSize( 34 this [all...] |