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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 // SwapBuffers callback. | 514 // SwapBuffers callback. |
515 void OnSwapBuffersComplete(); | 515 void OnSwapBuffersComplete(); |
516 virtual void OnContextLost(ContentGLContext::ContextLostReason reason); | 516 virtual void OnContextLost(ContentGLContext::ContextLostReason reason); |
517 virtual void OnErrorMessage(const std::string& message, int id); | 517 virtual void OnErrorMessage(const std::string& message, int id); |
518 | 518 |
519 // Check if we should call into the swap client. We can only do that on the | 519 // Check if we should call into the swap client. We can only do that on the |
520 // main thread. | 520 // main thread. |
521 bool ShouldUseSwapClient(); | 521 bool ShouldUseSwapClient(); |
522 | 522 |
523 // MemoryAllocationChanged callback. | 523 // MemoryAllocationChanged callback. |
524 void OnMemoryAllocationChanged(const GpuMemoryAllocation& allocation); | 524 void OnMemoryAllocationChanged(const GpuMemoryAllocationForRenderer& |
| 525 allocation); |
525 | 526 |
526 bool initialize_failed_; | 527 bool initialize_failed_; |
527 | 528 |
528 // The channel factory to talk to the GPU process | 529 // The channel factory to talk to the GPU process |
529 GpuChannelHostFactory* factory_; | 530 GpuChannelHostFactory* factory_; |
530 | 531 |
531 // The context we use for OpenGL rendering. | 532 // The context we use for OpenGL rendering. |
532 ContentGLContext* context_; | 533 ContentGLContext* context_; |
533 // The GLES2Implementation we use for OpenGL rendering. | 534 // The GLES2Implementation we use for OpenGL rendering. |
534 gpu::gles2::GLES2Implementation* gl_; | 535 gpu::gles2::GLES2Implementation* gl_; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 | 571 |
571 #ifdef FLIP_FRAMEBUFFER_VERTICALLY | 572 #ifdef FLIP_FRAMEBUFFER_VERTICALLY |
572 std::vector<uint8> scanline_; | 573 std::vector<uint8> scanline_; |
573 void FlipVertically(uint8* framebuffer, | 574 void FlipVertically(uint8* framebuffer, |
574 unsigned int width, | 575 unsigned int width, |
575 unsigned int height); | 576 unsigned int height); |
576 #endif | 577 #endif |
577 }; | 578 }; |
578 | 579 |
579 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 580 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
OLD | NEW |