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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 static std::unique_ptr<WebGraphicsContext3DProvider> | 592 static std::unique_ptr<WebGraphicsContext3DProvider> |
593 createContextProviderOnWorkerThread( | 593 createContextProviderOnWorkerThread( |
594 Platform::ContextAttributes contextAttributes, | 594 Platform::ContextAttributes contextAttributes, |
595 Platform::GraphicsInfo* glInfo, | 595 Platform::GraphicsInfo* glInfo, |
596 const KURL& url) { | 596 const KURL& url) { |
597 WaitableEvent waitableEvent; | 597 WaitableEvent waitableEvent; |
598 ContextProviderCreationInfo creationInfo; | 598 ContextProviderCreationInfo creationInfo; |
599 creationInfo.contextAttributes = contextAttributes; | 599 creationInfo.contextAttributes = contextAttributes; |
600 creationInfo.glInfo = glInfo; | 600 creationInfo.glInfo = glInfo; |
601 creationInfo.url = url; | 601 creationInfo.url = url; |
602 WebTaskRunner* taskRunner = | 602 RefPtr<WebTaskRunner> taskRunner = |
603 Platform::current()->mainThread()->getWebTaskRunner(); | 603 Platform::current()->mainThread()->getWebTaskRunner(); |
604 taskRunner->postTask(BLINK_FROM_HERE, | 604 taskRunner->postTask(BLINK_FROM_HERE, |
605 crossThreadBind(&createContextProviderOnMainThread, | 605 crossThreadBind(&createContextProviderOnMainThread, |
606 crossThreadUnretained(&creationInfo), | 606 crossThreadUnretained(&creationInfo), |
607 crossThreadUnretained(&waitableEvent))); | 607 crossThreadUnretained(&waitableEvent))); |
608 waitableEvent.wait(); | 608 waitableEvent.wait(); |
609 return std::move(creationInfo.createdContextProvider); | 609 return std::move(creationInfo.createdContextProvider); |
610 } | 610 } |
611 | 611 |
612 std::unique_ptr<WebGraphicsContext3DProvider> | 612 std::unique_ptr<WebGraphicsContext3DProvider> |
(...skipping 7130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7743 | 7743 |
7744 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( | 7744 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( |
7745 HTMLCanvasElementOrOffscreenCanvas& result) const { | 7745 HTMLCanvasElementOrOffscreenCanvas& result) const { |
7746 if (canvas()) | 7746 if (canvas()) |
7747 result.setHTMLCanvasElement(canvas()); | 7747 result.setHTMLCanvasElement(canvas()); |
7748 else | 7748 else |
7749 result.setOffscreenCanvas(getOffscreenCanvas()); | 7749 result.setOffscreenCanvas(getOffscreenCanvas()); |
7750 } | 7750 } |
7751 | 7751 |
7752 } // namespace blink | 7752 } // namespace blink |
OLD | NEW |