| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ |
| 6 #define WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ | 6 #define WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ |
| 7 | 7 |
| 8 #if defined(ENABLE_GPU) | 8 #if defined(ENABLE_GPU) |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 17 #include "webkit/gpu/webkit_gpu_export.h" | 17 #include "webkit/gpu/webkit_gpu_export.h" |
| 18 | 18 |
| 19 #if defined(USE_SKIA) | |
| 20 #define FLIP_FRAMEBUFFER_VERTICALLY | |
| 21 #endif | |
| 22 | |
| 23 namespace gpu { | 19 namespace gpu { |
| 24 namespace gles2 { | 20 namespace gles2 { |
| 25 class GLES2Implementation; | 21 class GLES2Implementation; |
| 26 } | 22 } |
| 27 } | 23 } |
| 28 | 24 |
| 29 using WebKit::WebGLId; | 25 using WebKit::WebGLId; |
| 30 | 26 |
| 31 using WebKit::WGC3Dbyte; | 27 using WebKit::WGC3Dbyte; |
| 32 using WebKit::WGC3Dchar; | 28 using WebKit::WGC3Dchar; |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 | 523 |
| 528 WebKit::WebGraphicsContext3D::Attributes attributes_; | 524 WebKit::WebGraphicsContext3D::Attributes attributes_; |
| 529 int cached_width_, cached_height_; | 525 int cached_width_, cached_height_; |
| 530 | 526 |
| 531 // For tracking which FBO is bound. | 527 // For tracking which FBO is bound. |
| 532 WebGLId bound_fbo_; | 528 WebGLId bound_fbo_; |
| 533 | 529 |
| 534 // Errors raised by synthesizeGLError(). | 530 // Errors raised by synthesizeGLError(). |
| 535 std::vector<WGC3Denum> synthetic_errors_; | 531 std::vector<WGC3Denum> synthetic_errors_; |
| 536 | 532 |
| 537 #ifdef FLIP_FRAMEBUFFER_VERTICALLY | |
| 538 std::vector<uint8> scanline_; | 533 std::vector<uint8> scanline_; |
| 539 void FlipVertically(uint8* framebuffer, | 534 void FlipVertically(uint8* framebuffer, |
| 540 unsigned int width, | 535 unsigned int width, |
| 541 unsigned int height); | 536 unsigned int height); |
| 542 #endif | |
| 543 }; | 537 }; |
| 544 | 538 |
| 545 } // namespace gpu | 539 } // namespace gpu |
| 546 } // namespace webkit | 540 } // namespace webkit |
| 547 | 541 |
| 548 #endif // defined(ENABLE_GPU) | 542 #endif // defined(ENABLE_GPU) |
| 549 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ | 543 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |