OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
6 #define CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 6 #define CHROME_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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 virtual void requestExtensionCHROMIUM(const char*); | 365 virtual void requestExtensionCHROMIUM(const char*); |
366 | 366 |
367 virtual unsigned createCompositorTexture(unsigned width, unsigned height); | 367 virtual unsigned createCompositorTexture(unsigned width, unsigned height); |
368 virtual void deleteCompositorTexture(unsigned parent_texture); | 368 virtual void deleteCompositorTexture(unsigned parent_texture); |
369 virtual void copyTextureToCompositor(unsigned texture, | 369 virtual void copyTextureToCompositor(unsigned texture, |
370 unsigned parent_texture); | 370 unsigned parent_texture); |
371 | 371 |
372 ggl::Context* context() { return context_; } | 372 ggl::Context* context() { return context_; } |
373 | 373 |
374 private: | 374 private: |
| 375 // SwapBuffers callback; |
| 376 void OnSwapBuffers(); |
| 377 |
375 // The GGL context we use for OpenGL rendering. | 378 // The GGL context we use for OpenGL rendering. |
376 ggl::Context* context_; | 379 ggl::Context* context_; |
377 // If rendering directly to WebView, weak pointer to it. | 380 // If rendering directly to WebView, weak pointer to it. |
378 WebKit::WebView* web_view_; | 381 WebKit::WebView* web_view_; |
379 #if defined(OS_MACOSX) | 382 #if defined(OS_MACOSX) |
380 // "Fake" plugin window handle in browser process for the compositor's output. | 383 // "Fake" plugin window handle in browser process for the compositor's output. |
381 gfx::PluginWindowHandle plugin_handle_; | 384 gfx::PluginWindowHandle plugin_handle_; |
382 #endif | 385 #endif |
383 | 386 |
384 WebKit::WebGraphicsContext3D::Attributes attributes_; | 387 WebKit::WebGraphicsContext3D::Attributes attributes_; |
385 int cached_width_, cached_height_; | 388 int cached_width_, cached_height_; |
386 | 389 |
387 // For tracking which FBO is bound. | 390 // For tracking which FBO is bound. |
388 unsigned int bound_fbo_; | 391 unsigned int bound_fbo_; |
389 | 392 |
390 // Errors raised by synthesizeGLError(). | 393 // Errors raised by synthesizeGLError(). |
391 std::vector<unsigned long> synthetic_errors_; | 394 std::vector<unsigned long> synthetic_errors_; |
392 | 395 |
393 #ifdef FLIP_FRAMEBUFFER_VERTICALLY | 396 #ifdef FLIP_FRAMEBUFFER_VERTICALLY |
394 scoped_ptr<uint8> scanline_; | 397 scoped_ptr<uint8> scanline_; |
395 void FlipVertically(uint8* framebuffer, | 398 void FlipVertically(uint8* framebuffer, |
396 unsigned int width, | 399 unsigned int width, |
397 unsigned int height); | 400 unsigned int height); |
398 #endif | 401 #endif |
399 }; | 402 }; |
400 | 403 |
401 #endif // defined(ENABLE_GPU) | 404 #endif // defined(ENABLE_GPU) |
402 #endif // CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 405 #endif // CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
403 | 406 |
OLD | NEW |