| 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 | 490 |
| 491 ~ScopedTexture2DRestorer() | 491 ~ScopedTexture2DRestorer() |
| 492 { | 492 { |
| 493 m_context->restoreCurrentTexture2D(); | 493 m_context->restoreCurrentTexture2D(); |
| 494 } | 494 } |
| 495 | 495 |
| 496 private: | 496 private: |
| 497 RawPtrWillBeMember<WebGLRenderingContextBase> m_context; | 497 RawPtrWillBeMember<WebGLRenderingContextBase> m_context; |
| 498 }; | 498 }; |
| 499 | 499 |
| 500 class WebGLRenderingContextLostCallback FINAL : public NoBaseWillBeGarbageCollec
tedFinalized<WebGLRenderingContextLostCallback>, public blink::WebGraphicsContex
t3D::WebGraphicsContextLostCallback { | 500 class WebGLRenderingContextLostCallback final : public NoBaseWillBeGarbageCollec
tedFinalized<WebGLRenderingContextLostCallback>, public blink::WebGraphicsContex
t3D::WebGraphicsContextLostCallback { |
| 501 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 501 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 502 public: | 502 public: |
| 503 static PassOwnPtrWillBeRawPtr<WebGLRenderingContextLostCallback> create(WebG
LRenderingContextBase* context) | 503 static PassOwnPtrWillBeRawPtr<WebGLRenderingContextLostCallback> create(WebG
LRenderingContextBase* context) |
| 504 { | 504 { |
| 505 return adoptPtrWillBeNoop(new WebGLRenderingContextLostCallback(context)
); | 505 return adoptPtrWillBeNoop(new WebGLRenderingContextLostCallback(context)
); |
| 506 } | 506 } |
| 507 | 507 |
| 508 virtual ~WebGLRenderingContextLostCallback() { } | 508 virtual ~WebGLRenderingContextLostCallback() { } |
| 509 | 509 |
| 510 virtual void onContextLost() { m_context->forceLostContext(WebGLRenderingCon
textBase::RealLostContext, WebGLRenderingContextBase::Auto); } | 510 virtual void onContextLost() { m_context->forceLostContext(WebGLRenderingCon
textBase::RealLostContext, WebGLRenderingContextBase::Auto); } |
| 511 | 511 |
| 512 void trace(Visitor* visitor) | 512 void trace(Visitor* visitor) |
| 513 { | 513 { |
| 514 visitor->trace(m_context); | 514 visitor->trace(m_context); |
| 515 } | 515 } |
| 516 | 516 |
| 517 private: | 517 private: |
| 518 explicit WebGLRenderingContextLostCallback(WebGLRenderingContextBase* contex
t) | 518 explicit WebGLRenderingContextLostCallback(WebGLRenderingContextBase* contex
t) |
| 519 : m_context(context) { } | 519 : m_context(context) { } |
| 520 | 520 |
| 521 RawPtrWillBeMember<WebGLRenderingContextBase> m_context; | 521 RawPtrWillBeMember<WebGLRenderingContextBase> m_context; |
| 522 }; | 522 }; |
| 523 | 523 |
| 524 class WebGLRenderingContextErrorMessageCallback FINAL : public NoBaseWillBeGarba
geCollectedFinalized<WebGLRenderingContextErrorMessageCallback>, public blink::W
ebGraphicsContext3D::WebGraphicsErrorMessageCallback { | 524 class WebGLRenderingContextErrorMessageCallback final : public NoBaseWillBeGarba
geCollectedFinalized<WebGLRenderingContextErrorMessageCallback>, public blink::W
ebGraphicsContext3D::WebGraphicsErrorMessageCallback { |
| 525 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 525 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 526 public: | 526 public: |
| 527 static PassOwnPtrWillBeRawPtr<WebGLRenderingContextErrorMessageCallback> cre
ate(WebGLRenderingContextBase* context) | 527 static PassOwnPtrWillBeRawPtr<WebGLRenderingContextErrorMessageCallback> cre
ate(WebGLRenderingContextBase* context) |
| 528 { | 528 { |
| 529 return adoptPtrWillBeNoop(new WebGLRenderingContextErrorMessageCallback(
context)); | 529 return adoptPtrWillBeNoop(new WebGLRenderingContextErrorMessageCallback(
context)); |
| 530 } | 530 } |
| 531 | 531 |
| 532 virtual ~WebGLRenderingContextErrorMessageCallback() { } | 532 virtual ~WebGLRenderingContextErrorMessageCallback() { } |
| 533 | 533 |
| 534 virtual void onErrorMessage(const blink::WebString& message, blink::WGC3Dint
) | 534 virtual void onErrorMessage(const blink::WebString& message, blink::WGC3Dint
) |
| (...skipping 5259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5794 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 5794 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
| 5795 } | 5795 } |
| 5796 #else | 5796 #else |
| 5797 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 5797 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
| 5798 { | 5798 { |
| 5799 return m_drawingBuffer.get(); | 5799 return m_drawingBuffer.get(); |
| 5800 } | 5800 } |
| 5801 #endif | 5801 #endif |
| 5802 | 5802 |
| 5803 } // namespace blink | 5803 } // namespace blink |
| OLD | NEW |