OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 | 593 |
594 static std::unique_ptr<WebGraphicsContext3DProvider> | 594 static std::unique_ptr<WebGraphicsContext3DProvider> |
595 createContextProviderOnWorkerThread( | 595 createContextProviderOnWorkerThread( |
596 Platform::ContextAttributes contextAttributes, | 596 Platform::ContextAttributes contextAttributes, |
597 Platform::GraphicsInfo* glInfo, | 597 Platform::GraphicsInfo* glInfo, |
598 const KURL& url) { | 598 const KURL& url) { |
599 WaitableEvent waitableEvent; | 599 WaitableEvent waitableEvent; |
600 ContextProviderCreationInfo creationInfo; | 600 ContextProviderCreationInfo creationInfo; |
601 creationInfo.contextAttributes = contextAttributes; | 601 creationInfo.contextAttributes = contextAttributes; |
602 creationInfo.glInfo = glInfo; | 602 creationInfo.glInfo = glInfo; |
603 creationInfo.url = url; | 603 creationInfo.url = url.copy(); |
604 RefPtr<WebTaskRunner> taskRunner = | 604 RefPtr<WebTaskRunner> taskRunner = |
605 Platform::current()->mainThread()->getWebTaskRunner(); | 605 Platform::current()->mainThread()->getWebTaskRunner(); |
606 taskRunner->postTask(BLINK_FROM_HERE, | 606 taskRunner->postTask(BLINK_FROM_HERE, |
607 crossThreadBind(&createContextProviderOnMainThread, | 607 crossThreadBind(&createContextProviderOnMainThread, |
608 crossThreadUnretained(&creationInfo), | 608 crossThreadUnretained(&creationInfo), |
609 crossThreadUnretained(&waitableEvent))); | 609 crossThreadUnretained(&waitableEvent))); |
610 waitableEvent.wait(); | 610 waitableEvent.wait(); |
611 return std::move(creationInfo.createdContextProvider); | 611 return std::move(creationInfo.createdContextProvider); |
612 } | 612 } |
613 | 613 |
(...skipping 7207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7821 | 7821 |
7822 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( | 7822 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( |
7823 HTMLCanvasElementOrOffscreenCanvas& result) const { | 7823 HTMLCanvasElementOrOffscreenCanvas& result) const { |
7824 if (canvas()) | 7824 if (canvas()) |
7825 result.setHTMLCanvasElement(canvas()); | 7825 result.setHTMLCanvasElement(canvas()); |
7826 else | 7826 else |
7827 result.setOffscreenCanvas(offscreenCanvas()); | 7827 result.setOffscreenCanvas(offscreenCanvas()); |
7828 } | 7828 } |
7829 | 7829 |
7830 } // namespace blink | 7830 } // namespace blink |
OLD | NEW |