| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/ggl.h" | 5 #include "content/renderer/ggl.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
| 9 #include "base/weak_ptr.h" | 9 #include "base/weak_ptr.h" |
| 10 #include "chrome/renderer/render_widget.h" | 10 #include "chrome/renderer/render_widget.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 uint32 CreateParentTexture(const gfx::Size& size) const; | 95 uint32 CreateParentTexture(const gfx::Size& size) const; |
| 96 void DeleteParentTexture(uint32 texture) const; | 96 void DeleteParentTexture(uint32 texture) const; |
| 97 | 97 |
| 98 // Destroy all resources associated with the GGL context. | 98 // Destroy all resources associated with the GGL context. |
| 99 void Destroy(); | 99 void Destroy(); |
| 100 | 100 |
| 101 // Make a GGL context current for the calling thread. | 101 // Make a GGL context current for the calling thread. |
| 102 static bool MakeCurrent(Context* context); | 102 static bool MakeCurrent(Context* context); |
| 103 | 103 |
| 104 // Display all content rendered since last call to SwapBuffers. | 104 // Display all content rendered since last call to SwapBuffers. |
| 105 // TODO(apatrick): support rendering to browser window. This function is | |
| 106 // not useful at this point. | |
| 107 bool SwapBuffers(); | 105 bool SwapBuffers(); |
| 108 | 106 |
| 109 // Create a hardware accelerated video decoder associated with this context. | 107 // Create a hardware accelerated video decoder associated with this context. |
| 110 media::VideoDecodeEngine* CreateVideoDecodeEngine(); | 108 media::VideoDecodeEngine* CreateVideoDecodeEngine(); |
| 111 | 109 |
| 112 // Create a hardware video decode context associated with this context. | 110 // Create a hardware video decode context associated with this context. |
| 113 media::VideoDecodeContext* CreateVideoDecodeContext(MessageLoop* message_loop, | 111 media::VideoDecodeContext* CreateVideoDecodeContext(MessageLoop* message_loop, |
| 114 bool hardware_decoder); | 112 bool hardware_decoder); |
| 115 | 113 |
| 116 // Get the current error code. Clears context's error code afterwards. | 114 // Get the current error code. Clears context's error code afterwards. |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 | 602 |
| 605 return context->gles2_implementation(); | 603 return context->gles2_implementation(); |
| 606 } | 604 } |
| 607 | 605 |
| 608 CommandBufferProxy* GetCommandBufferProxy(Context* context) { | 606 CommandBufferProxy* GetCommandBufferProxy(Context* context) { |
| 609 DCHECK(context); | 607 DCHECK(context); |
| 610 return context->command_buffer(); | 608 return context->command_buffer(); |
| 611 } | 609 } |
| 612 | 610 |
| 613 } // namespace ggl | 611 } // namespace ggl |
| OLD | NEW |