OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 virtual void setVisibilityCHROMIUM(bool visible); | 512 virtual void setVisibilityCHROMIUM(bool visible); |
513 | 513 |
514 virtual void discardFramebufferEXT(WGC3Denum target, | 514 virtual void discardFramebufferEXT(WGC3Denum target, |
515 WGC3Dsizei numAttachments, | 515 WGC3Dsizei numAttachments, |
516 const WGC3Denum* attachments); | 516 const WGC3Denum* attachments); |
517 virtual void ensureFramebufferCHROMIUM(); | 517 virtual void ensureFramebufferCHROMIUM(); |
518 | 518 |
519 virtual void setMemoryAllocationChangedCallbackCHROMIUM( | 519 virtual void setMemoryAllocationChangedCallbackCHROMIUM( |
520 WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* callback); | 520 WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* callback); |
521 | 521 |
| 522 virtual void setUpdateVSyncTimeCallbackCHROMIUM( |
| 523 WebGraphicsUpdateVSyncTimeCallbackCHROMIUM* callback); |
| 524 |
522 virtual void copyTextureToParentTextureCHROMIUM( | 525 virtual void copyTextureToParentTextureCHROMIUM( |
523 WebGLId texture, WebGLId parentTexture); | 526 WebGLId texture, WebGLId parentTexture); |
524 | 527 |
525 virtual void rateLimitOffscreenContextCHROMIUM(); | 528 virtual void rateLimitOffscreenContextCHROMIUM(); |
526 | 529 |
527 virtual WebKit::WebString getRequestableExtensionsCHROMIUM(); | 530 virtual WebKit::WebString getRequestableExtensionsCHROMIUM(); |
528 virtual void requestExtensionCHROMIUM(const char*); | 531 virtual void requestExtensionCHROMIUM(const char*); |
529 | 532 |
530 virtual void blitFramebufferCHROMIUM( | 533 virtual void blitFramebufferCHROMIUM( |
531 WGC3Dint srcX0, WGC3Dint srcY0, WGC3Dint srcX1, WGC3Dint srcY1, | 534 WGC3Dint srcX0, WGC3Dint srcY0, WGC3Dint srcX1, WGC3Dint srcY1, |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 virtual void OnErrorMessage(const std::string& message, int id); | 662 virtual void OnErrorMessage(const std::string& message, int id); |
660 | 663 |
661 // Check if we should call into the swap client. We can only do that on the | 664 // Check if we should call into the swap client. We can only do that on the |
662 // main thread. | 665 // main thread. |
663 bool ShouldUseSwapClient(); | 666 bool ShouldUseSwapClient(); |
664 | 667 |
665 // MemoryAllocationChanged callback. | 668 // MemoryAllocationChanged callback. |
666 void OnMemoryAllocationChanged(const GpuMemoryAllocationForRenderer& | 669 void OnMemoryAllocationChanged(const GpuMemoryAllocationForRenderer& |
667 allocation); | 670 allocation); |
668 | 671 |
| 672 // UpdateVSyncTime callback. |
| 673 void OnUpdateVSyncTime(int64 time); |
| 674 |
669 bool initialize_failed_; | 675 bool initialize_failed_; |
670 | 676 |
671 // The channel factory to talk to the GPU process | 677 // The channel factory to talk to the GPU process |
672 GpuChannelHostFactory* factory_; | 678 GpuChannelHostFactory* factory_; |
673 | 679 |
674 bool visible_; | 680 bool visible_; |
675 bool free_command_buffer_when_invisible_; | 681 bool free_command_buffer_when_invisible_; |
676 | 682 |
677 // State needed by MaybeInitializeGL. | 683 // State needed by MaybeInitializeGL. |
678 scoped_refptr<GpuChannelHost> host_; | 684 scoped_refptr<GpuChannelHost> host_; |
679 int32 surface_id_; | 685 int32 surface_id_; |
680 GURL active_url_; | 686 GURL active_url_; |
681 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client_; | 687 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client_; |
682 | 688 |
683 WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* | 689 WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* |
684 memory_allocation_changed_callback_; | 690 memory_allocation_changed_callback_; |
685 | 691 |
| 692 WebGraphicsUpdateVSyncTimeCallbackCHROMIUM* update_vsync_time_callback_; |
| 693 |
686 WebGraphicsContext3D::WebGraphicsContextLostCallback* context_lost_callback_; | 694 WebGraphicsContext3D::WebGraphicsContextLostCallback* context_lost_callback_; |
687 WGC3Denum context_lost_reason_; | 695 WGC3Denum context_lost_reason_; |
688 | 696 |
689 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* | 697 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* |
690 error_message_callback_; | 698 error_message_callback_; |
691 scoped_ptr<WebGraphicsContext3DErrorMessageCallback> | 699 scoped_ptr<WebGraphicsContext3DErrorMessageCallback> |
692 client_error_message_callback_; | 700 client_error_message_callback_; |
693 | 701 |
694 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* | 702 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* |
695 swapbuffers_complete_callback_; | 703 swapbuffers_complete_callback_; |
(...skipping 24 matching lines...) Expand all Loading... |
720 gpu::gles2::GLES2CmdHelper* gles2_helper_; | 728 gpu::gles2::GLES2CmdHelper* gles2_helper_; |
721 gpu::TransferBuffer* transfer_buffer_; | 729 gpu::TransferBuffer* transfer_buffer_; |
722 gpu::gles2::GLES2Implementation* gl_; | 730 gpu::gles2::GLES2Implementation* gl_; |
723 Error last_error_; | 731 Error last_error_; |
724 int frame_number_; | 732 int frame_number_; |
725 bool bind_generates_resources_; | 733 bool bind_generates_resources_; |
726 bool use_echo_for_swap_ack_; | 734 bool use_echo_for_swap_ack_; |
727 }; | 735 }; |
728 | 736 |
729 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 737 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
OLD | NEW |