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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 ggl::Context* context() { return context_; } | 380 ggl::Context* context() { return context_; } |
381 | 381 |
382 private: | 382 private: |
383 // SwapBuffers callback; | 383 // SwapBuffers callback; |
384 void OnSwapBuffers(); | 384 void OnSwapBuffers(); |
385 | 385 |
386 // The GGL context we use for OpenGL rendering. | 386 // The GGL context we use for OpenGL rendering. |
387 ggl::Context* context_; | 387 ggl::Context* context_; |
388 // If rendering directly to WebView, weak pointer to it. | 388 // If rendering directly to WebView, weak pointer to it. |
389 WebKit::WebView* web_view_; | 389 WebKit::WebView* web_view_; |
390 #if defined(OS_MACOSX) | |
391 // "Fake" plugin window handle in browser process for the compositor's output. | |
392 gfx::PluginWindowHandle plugin_handle_; | |
393 #endif | |
394 | 390 |
395 WebKit::WebGraphicsContext3D::Attributes attributes_; | 391 WebKit::WebGraphicsContext3D::Attributes attributes_; |
396 int cached_width_, cached_height_; | 392 int cached_width_, cached_height_; |
397 | 393 |
398 // For tracking which FBO is bound. | 394 // For tracking which FBO is bound. |
399 unsigned int bound_fbo_; | 395 unsigned int bound_fbo_; |
400 | 396 |
401 // Errors raised by synthesizeGLError(). | 397 // Errors raised by synthesizeGLError(). |
402 std::vector<unsigned long> synthetic_errors_; | 398 std::vector<unsigned long> synthetic_errors_; |
403 | 399 |
404 #ifdef FLIP_FRAMEBUFFER_VERTICALLY | 400 #ifdef FLIP_FRAMEBUFFER_VERTICALLY |
405 scoped_ptr<uint8> scanline_; | 401 scoped_ptr<uint8> scanline_; |
406 void FlipVertically(uint8* framebuffer, | 402 void FlipVertically(uint8* framebuffer, |
407 unsigned int width, | 403 unsigned int width, |
408 unsigned int height); | 404 unsigned int height); |
409 #endif | 405 #endif |
410 }; | 406 }; |
411 | 407 |
412 #endif // defined(ENABLE_GPU) | 408 #endif // defined(ENABLE_GPU) |
413 #endif // CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 409 #endif // CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
414 | 410 |
OLD | NEW |