Chromium Code Reviews| 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 427 WebGLId parent_texture); | 427 WebGLId parent_texture); |
| 428 | 428 |
| 429 RendererGLContext* context() { return context_; } | 429 RendererGLContext* context() { return context_; } |
| 430 | 430 |
| 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 void localMakeContextCurrent(); | |
| 437 virtual void OnContextLost(); | 438 virtual void OnContextLost(); |
| 438 | 439 |
| 439 // The context we use for OpenGL rendering. | 440 // The context we use for OpenGL rendering. |
| 440 RendererGLContext* context_; | 441 RendererGLContext* context_; |
| 442 // The GLES2Implementation we use for OpenGL R | |
|
Ken Russell (switch to Gerrit)
2011/05/21 01:09:21
Is the "R" at the end a typo?
greggman
2011/05/21 01:22:49
Done.
| |
| 443 gpu::gles2::GLES2Implementation* gles2_implementation_; | |
| 444 | |
| 441 // If rendering directly to WebView, weak pointer to it. | 445 // If rendering directly to WebView, weak pointer to it. |
| 442 WebKit::WebView* web_view_; | 446 WebKit::WebView* web_view_; |
| 443 #if defined(OS_MACOSX) | 447 #if defined(OS_MACOSX) |
| 444 // "Fake" plugin window handle in browser process for the compositor's output. | 448 // "Fake" plugin window handle in browser process for the compositor's output. |
| 445 gfx::PluginWindowHandle plugin_handle_; | 449 gfx::PluginWindowHandle plugin_handle_; |
| 446 #endif | 450 #endif |
| 447 WebGraphicsContext3D::WebGraphicsContextLostCallback* context_lost_callback_; | 451 WebGraphicsContext3D::WebGraphicsContextLostCallback* context_lost_callback_; |
| 448 | 452 |
| 449 WebKit::WebGraphicsContext3D::Attributes attributes_; | 453 WebKit::WebGraphicsContext3D::Attributes attributes_; |
| 450 int cached_width_, cached_height_; | 454 int cached_width_, cached_height_; |
| 451 | 455 |
| 452 // For tracking which FBO is bound. | 456 // For tracking which FBO is bound. |
| 453 WebGLId bound_fbo_; | 457 WebGLId bound_fbo_; |
| 454 | 458 |
| 455 // Errors raised by synthesizeGLError(). | 459 // Errors raised by synthesizeGLError(). |
| 456 std::vector<WGC3Denum> synthetic_errors_; | 460 std::vector<WGC3Denum> synthetic_errors_; |
| 457 | 461 |
| 458 #ifdef FLIP_FRAMEBUFFER_VERTICALLY | 462 #ifdef FLIP_FRAMEBUFFER_VERTICALLY |
| 459 scoped_array<uint8> scanline_; | 463 scoped_array<uint8> scanline_; |
| 460 void FlipVertically(uint8* framebuffer, | 464 void FlipVertically(uint8* framebuffer, |
| 461 unsigned int width, | 465 unsigned int width, |
| 462 unsigned int height); | 466 unsigned int height); |
| 463 #endif | 467 #endif |
| 464 }; | 468 }; |
| 465 | 469 |
| 466 #endif // defined(ENABLE_GPU) | 470 #endif // defined(ENABLE_GPU) |
| 467 #endif // CONTENT_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 471 #endif // CONTENT_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |