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_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_ | 5 #ifndef WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_ |
6 #define WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_ | 6 #define WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 using blink::WGC3Dboolean; | 30 using blink::WGC3Dboolean; |
31 using blink::WGC3Dbitfield; | 31 using blink::WGC3Dbitfield; |
32 using blink::WGC3Dint; | 32 using blink::WGC3Dint; |
33 using blink::WGC3Dsizei; | 33 using blink::WGC3Dsizei; |
34 using blink::WGC3Duint; | 34 using blink::WGC3Duint; |
35 using blink::WGC3Dfloat; | 35 using blink::WGC3Dfloat; |
36 using blink::WGC3Dclampf; | 36 using blink::WGC3Dclampf; |
37 using blink::WGC3Dintptr; | 37 using blink::WGC3Dintptr; |
38 using blink::WGC3Dsizeiptr; | 38 using blink::WGC3Dsizeiptr; |
39 | 39 |
40 namespace content { | 40 namespace webkit { |
| 41 namespace gpu { |
41 | 42 |
42 class WebGraphicsContext3DErrorMessageCallback; | 43 class WebGraphicsContext3DErrorMessageCallback; |
43 | 44 |
44 class WEBKIT_GPU_EXPORT WebGraphicsContext3DImpl | 45 class WEBKIT_GPU_EXPORT WebGraphicsContext3DImpl |
45 : public NON_EXPORTED_BASE(blink::WebGraphicsContext3D) { | 46 : public NON_EXPORTED_BASE(blink::WebGraphicsContext3D) { |
46 public: | 47 public: |
47 //---------------------------------------------------------------------- | 48 //---------------------------------------------------------------------- |
48 // WebGraphicsContext3D methods | 49 // WebGraphicsContext3D methods |
49 | 50 |
50 virtual uint32_t lastFlushID(); | 51 virtual uint32_t lastFlushID(); |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 WGC3Denum textarget, | 546 WGC3Denum textarget, |
546 WebGLId texture, | 547 WebGLId texture, |
547 WGC3Dint level, | 548 WGC3Dint level, |
548 WGC3Dsizei samples); | 549 WGC3Dsizei samples); |
549 virtual void renderbufferStorageMultisampleEXT( | 550 virtual void renderbufferStorageMultisampleEXT( |
550 WGC3Denum target, WGC3Dsizei samples, WGC3Denum internalformat, | 551 WGC3Denum target, WGC3Dsizei samples, WGC3Denum internalformat, |
551 WGC3Dsizei width, WGC3Dsizei height); | 552 WGC3Dsizei width, WGC3Dsizei height); |
552 | 553 |
553 virtual GrGLInterface* createGrGLInterface(); | 554 virtual GrGLInterface* createGrGLInterface(); |
554 | 555 |
555 gpu::gles2::GLES2Interface* GetGLInterface() { | 556 ::gpu::gles2::GLES2Interface* GetGLInterface() { |
556 return gl_; | 557 return gl_; |
557 } | 558 } |
558 | 559 |
559 protected: | 560 protected: |
560 friend class WebGraphicsContext3DErrorMessageCallback; | 561 friend class WebGraphicsContext3DErrorMessageCallback; |
561 | 562 |
562 WebGraphicsContext3DImpl( | 563 WebGraphicsContext3DImpl( |
563 const Attributes& attributes, | 564 const Attributes& attributes, |
564 bool lose_context_when_out_of_memory); | 565 bool lose_context_when_out_of_memory); |
565 virtual ~WebGraphicsContext3DImpl(); | 566 virtual ~WebGraphicsContext3DImpl(); |
566 | 567 |
567 gpu::gles2::GLES2ImplementationErrorMessageCallback* | 568 ::gpu::gles2::GLES2ImplementationErrorMessageCallback* |
568 getErrorMessageCallback(); | 569 getErrorMessageCallback(); |
569 virtual void OnErrorMessage(const std::string& message, int id); | 570 virtual void OnErrorMessage(const std::string& message, int id); |
570 | 571 |
571 void setGLInterface(gpu::gles2::GLES2Interface* gl) { | 572 void setGLInterface(::gpu::gles2::GLES2Interface* gl) { |
572 gl_ = gl; | 573 gl_ = gl; |
573 } | 574 } |
574 | 575 |
575 bool initialized_; | 576 bool initialized_; |
576 bool initialize_failed_; | 577 bool initialize_failed_; |
577 | 578 |
578 WebGraphicsContext3D::WebGraphicsContextLostCallback* context_lost_callback_; | 579 WebGraphicsContext3D::WebGraphicsContextLostCallback* context_lost_callback_; |
579 WGC3Denum context_lost_reason_; | 580 WGC3Denum context_lost_reason_; |
580 | 581 |
581 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* | 582 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* |
582 error_message_callback_; | 583 error_message_callback_; |
583 scoped_ptr<WebGraphicsContext3DErrorMessageCallback> | 584 scoped_ptr<WebGraphicsContext3DErrorMessageCallback> |
584 client_error_message_callback_; | 585 client_error_message_callback_; |
585 | 586 |
586 blink::WebGraphicsContext3D::Attributes attributes_; | 587 blink::WebGraphicsContext3D::Attributes attributes_; |
587 | 588 |
588 // Errors raised by synthesizeGLError(). | 589 // Errors raised by synthesizeGLError(). |
589 std::vector<WGC3Denum> synthetic_errors_; | 590 std::vector<WGC3Denum> synthetic_errors_; |
590 | 591 |
591 gpu::gles2::GLES2Interface* gl_; | 592 ::gpu::gles2::GLES2Interface* gl_; |
592 bool lose_context_when_out_of_memory_; | 593 bool lose_context_when_out_of_memory_; |
593 uint32_t flush_id_; | 594 uint32_t flush_id_; |
594 }; | 595 }; |
595 | 596 |
596 } // namespace content | 597 } // namespace gpu |
| 598 } // namespace webkit |
597 | 599 |
598 #endif // WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_ | 600 #endif // WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IMPL_H_ |
OLD | NEW |