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