OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 { | 45 { |
46 if (force) | 46 if (force) |
47 WebGLExtension::lose(true); | 47 WebGLExtension::lose(true); |
48 } | 48 } |
49 | 49 |
50 WebGLExtensionName WebGLLoseContext::name() const | 50 WebGLExtensionName WebGLLoseContext::name() const |
51 { | 51 { |
52 return WebGLLoseContextName; | 52 return WebGLLoseContextName; |
53 } | 53 } |
54 | 54 |
55 PassRefPtr<WebGLLoseContext> WebGLLoseContext::create(WebGLRenderingContextBase*
context) | 55 PassRefPtrWillBeRawPtr<WebGLLoseContext> WebGLLoseContext::create(WebGLRendering
ContextBase* context) |
56 { | 56 { |
57 return adoptRef(new WebGLLoseContext(context)); | 57 return adoptRefWillBeNoop(new WebGLLoseContext(context)); |
58 } | 58 } |
59 | 59 |
60 void WebGLLoseContext::loseContext() | 60 void WebGLLoseContext::loseContext() |
61 { | 61 { |
62 if (!isLost()) | 62 if (!isLost()) |
63 m_context->forceLostContext(WebGLRenderingContextBase::SyntheticLostCont
ext); | 63 m_context->forceLostContext(WebGLRenderingContextBase::SyntheticLostCont
ext); |
64 } | 64 } |
65 | 65 |
66 void WebGLLoseContext::restoreContext() | 66 void WebGLLoseContext::restoreContext() |
67 { | 67 { |
68 if (!isLost()) | 68 if (!isLost()) |
69 m_context->forceRestoreContext(); | 69 m_context->forceRestoreContext(); |
70 } | 70 } |
71 | 71 |
72 bool WebGLLoseContext::supported(WebGLRenderingContextBase*) | 72 bool WebGLLoseContext::supported(WebGLRenderingContextBase*) |
73 { | 73 { |
74 return true; | 74 return true; |
75 } | 75 } |
76 | 76 |
77 const char* WebGLLoseContext::extensionName() | 77 const char* WebGLLoseContext::extensionName() |
78 { | 78 { |
79 return "WEBGL_lose_context"; | 79 return "WEBGL_lose_context"; |
80 } | 80 } |
81 | 81 |
82 } // namespace WebCore | 82 } // namespace WebCore |
OLD | NEW |