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