| 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/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC
ontext3D.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC
ontext3D.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
| 16 | 16 |
| 17 #if defined(USE_SKIA) | 17 #if defined(USE_SKIA) |
| 18 #define FLIP_FRAMEBUFFER_VERTICALLY | 18 #define FLIP_FRAMEBUFFER_VERTICALLY |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 namespace gpu { | 21 namespace gpu { |
| 22 namespace gles2 { | 22 namespace gles2 { |
| 23 class GLES2Implementation; | 23 class GLES2Implementation; |
| 24 } | 24 } |
| 25 } | 25 } |
| 26 | 26 |
| 27 using WebKit::WebGLId; | 27 using WebKit::WebGLId; |
| 28 | 28 |
| 29 using WebKit::WGC3Dbyte; |
| 29 using WebKit::WGC3Dchar; | 30 using WebKit::WGC3Dchar; |
| 30 using WebKit::WGC3Denum; | 31 using WebKit::WGC3Denum; |
| 31 using WebKit::WGC3Dboolean; | 32 using WebKit::WGC3Dboolean; |
| 32 using WebKit::WGC3Dbitfield; | 33 using WebKit::WGC3Dbitfield; |
| 33 using WebKit::WGC3Dint; | 34 using WebKit::WGC3Dint; |
| 34 using WebKit::WGC3Dsizei; | 35 using WebKit::WGC3Dsizei; |
| 35 using WebKit::WGC3Duint; | 36 using WebKit::WGC3Duint; |
| 36 using WebKit::WGC3Dfloat; | 37 using WebKit::WGC3Dfloat; |
| 37 using WebKit::WGC3Dclampf; | 38 using WebKit::WGC3Dclampf; |
| 38 using WebKit::WGC3Dintptr; | 39 using WebKit::WGC3Dintptr; |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 | 477 |
| 477 virtual void copyTextureCHROMIUM(WGC3Denum target, WGC3Duint source_id, | 478 virtual void copyTextureCHROMIUM(WGC3Denum target, WGC3Duint source_id, |
| 478 WGC3Duint dest_id, WGC3Dint level, | 479 WGC3Duint dest_id, WGC3Dint level, |
| 479 WGC3Denum internal_format); | 480 WGC3Denum internal_format); |
| 480 | 481 |
| 481 virtual void bindUniformLocationCHROMIUM(WebGLId program, WGC3Dint location, | 482 virtual void bindUniformLocationCHROMIUM(WebGLId program, WGC3Dint location, |
| 482 const WGC3Dchar* uniform); | 483 const WGC3Dchar* uniform); |
| 483 | 484 |
| 484 virtual void shallowFlushCHROMIUM(); | 485 virtual void shallowFlushCHROMIUM(); |
| 485 | 486 |
| 487 virtual void genMailboxCHROMIUM(WGC3Dbyte* mailbox); |
| 488 virtual void produceTextureCHROMIUM(WGC3Denum target, |
| 489 const WGC3Dbyte* mailbox); |
| 490 virtual void consumeTextureCHROMIUM(WGC3Denum target, |
| 491 const WGC3Dbyte* mailbox); |
| 492 |
| 486 protected: | 493 protected: |
| 487 virtual GrGLInterface* onCreateGrGLInterface(); | 494 virtual GrGLInterface* onCreateGrGLInterface(); |
| 488 | 495 |
| 489 private: | 496 private: |
| 490 // SwapBuffers callback. | 497 // SwapBuffers callback. |
| 491 void OnSwapBuffersComplete(); | 498 void OnSwapBuffersComplete(); |
| 492 virtual void OnContextLost(); | 499 virtual void OnContextLost(); |
| 493 | 500 |
| 494 // Used to try to find bugs in code that calls gl directly through the gl api | 501 // Used to try to find bugs in code that calls gl directly through the gl api |
| 495 // instead of going through WebGraphicsContext3D. | 502 // instead of going through WebGraphicsContext3D. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 518 unsigned int width, | 525 unsigned int width, |
| 519 unsigned int height); | 526 unsigned int height); |
| 520 #endif | 527 #endif |
| 521 }; | 528 }; |
| 522 | 529 |
| 523 } // namespace gpu | 530 } // namespace gpu |
| 524 } // namespace webkit | 531 } // namespace webkit |
| 525 | 532 |
| 526 #endif // defined(ENABLE_GPU) | 533 #endif // defined(ENABLE_GPU) |
| 527 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ | 534 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |