| 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 #ifndef CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| 6 #define CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 6 #define CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
| 10 | 10 |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 private: | 433 private: |
| 434 // SwapBuffers callback. | 434 // SwapBuffers callback. |
| 435 void OnSwapBuffersComplete(); | 435 void OnSwapBuffersComplete(); |
| 436 virtual void OnContextLost(RendererGLContext::ContextLostReason reason); | 436 virtual void OnContextLost(RendererGLContext::ContextLostReason reason); |
| 437 | 437 |
| 438 // The context we use for OpenGL rendering. | 438 // The context we use for OpenGL rendering. |
| 439 RendererGLContext* context_; | 439 RendererGLContext* context_; |
| 440 // The GLES2Implementation we use for OpenGL rendering. | 440 // The GLES2Implementation we use for OpenGL rendering. |
| 441 gpu::gles2::GLES2Implementation* gl_; | 441 gpu::gles2::GLES2Implementation* gl_; |
| 442 | 442 |
| 443 bool render_directly_to_web_view_; |
| 444 #ifndef WTF_USE_THREADED_COMPOSITING |
| 443 // If rendering directly to WebView, weak pointer to it. | 445 // If rendering directly to WebView, weak pointer to it. |
| 444 WebKit::WebView* web_view_; | 446 WebKit::WebView* web_view_; |
| 447 #endif |
| 445 #if defined(OS_MACOSX) | 448 #if defined(OS_MACOSX) |
| 446 // "Fake" plugin window handle in browser process for the compositor's output. | 449 // "Fake" plugin window handle in browser process for the compositor's output. |
| 447 gfx::PluginWindowHandle plugin_handle_; | 450 gfx::PluginWindowHandle plugin_handle_; |
| 448 #endif | 451 #endif |
| 449 WebGraphicsContext3D::WebGraphicsContextLostCallback* context_lost_callback_; | 452 WebGraphicsContext3D::WebGraphicsContextLostCallback* context_lost_callback_; |
| 450 WGC3Denum context_lost_reason_; | 453 WGC3Denum context_lost_reason_; |
| 451 | 454 |
| 452 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* | 455 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* |
| 453 swapbuffers_complete_callback_; | 456 swapbuffers_complete_callback_; |
| 454 | 457 |
| 455 WebKit::WebGraphicsContext3D::Attributes attributes_; | 458 WebKit::WebGraphicsContext3D::Attributes attributes_; |
| 456 int cached_width_, cached_height_; | 459 int cached_width_, cached_height_; |
| 457 | 460 |
| 458 // For tracking which FBO is bound. | 461 // For tracking which FBO is bound. |
| 459 WebGLId bound_fbo_; | 462 WebGLId bound_fbo_; |
| 460 | 463 |
| 461 // Errors raised by synthesizeGLError(). | 464 // Errors raised by synthesizeGLError(). |
| 462 std::vector<WGC3Denum> synthetic_errors_; | 465 std::vector<WGC3Denum> synthetic_errors_; |
| 463 | 466 |
| 464 #ifdef FLIP_FRAMEBUFFER_VERTICALLY | 467 #ifdef FLIP_FRAMEBUFFER_VERTICALLY |
| 465 scoped_array<uint8> scanline_; | 468 scoped_array<uint8> scanline_; |
| 466 void FlipVertically(uint8* framebuffer, | 469 void FlipVertically(uint8* framebuffer, |
| 467 unsigned int width, | 470 unsigned int width, |
| 468 unsigned int height); | 471 unsigned int height); |
| 469 #endif | 472 #endif |
| 470 }; | 473 }; |
| 471 | 474 |
| 472 #endif // defined(ENABLE_GPU) | 475 #endif // defined(ENABLE_GPU) |
| 473 #endif // CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 476 #endif // CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |