| 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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 | 546 |
| 551 WebKit::WebGraphicsContext3D::Attributes attributes_; | 547 WebKit::WebGraphicsContext3D::Attributes attributes_; |
| 552 int cached_width_, cached_height_; | 548 int cached_width_, cached_height_; |
| 553 | 549 |
| 554 // For tracking which FBO is bound. | 550 // For tracking which FBO is bound. |
| 555 WebGLId bound_fbo_; | 551 WebGLId bound_fbo_; |
| 556 | 552 |
| 557 // Errors raised by synthesizeGLError(). | 553 // Errors raised by synthesizeGLError(). |
| 558 std::vector<WGC3Denum> synthetic_errors_; | 554 std::vector<WGC3Denum> synthetic_errors_; |
| 559 | 555 |
| 560 #ifdef FLIP_FRAMEBUFFER_VERTICALLY | |
| 561 std::vector<uint8> scanline_; | 556 std::vector<uint8> scanline_; |
| 562 void FlipVertically(uint8* framebuffer, | 557 void FlipVertically(uint8* framebuffer, |
| 563 unsigned int width, | 558 unsigned int width, |
| 564 unsigned int height); | 559 unsigned int height); |
| 565 #endif | |
| 566 }; | 560 }; |
| 567 | 561 |
| 568 } // namespace gpu | 562 } // namespace gpu |
| 569 } // namespace webkit | 563 } // namespace webkit |
| 570 | 564 |
| 571 #endif // defined(ENABLE_GPU) | 565 #endif // defined(ENABLE_GPU) |
| 572 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ | 566 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |