OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "base/callback_forward.h" | 34 #include "base/callback_forward.h" |
35 | 35 |
36 class GrContext; | 36 class GrContext; |
37 | 37 |
38 namespace gpu { | 38 namespace gpu { |
39 struct Capabilities; | 39 struct Capabilities; |
40 | 40 |
41 namespace gles2 { | 41 namespace gles2 { |
42 class GLES2Interface; | 42 class GLES2Interface; |
43 } | 43 } |
44 } | 44 } // namespace gpu |
45 | 45 |
46 namespace blink { | 46 namespace blink { |
47 | 47 |
48 class WebGraphicsContext3DProvider { | 48 class WebGraphicsContext3DProvider { |
49 public: | 49 public: |
50 virtual ~WebGraphicsContext3DProvider() {} | 50 virtual ~WebGraphicsContext3DProvider() {} |
51 | 51 |
52 virtual gpu::gles2::GLES2Interface* ContextGL() = 0; | 52 virtual gpu::gles2::GLES2Interface* ContextGL() = 0; |
53 virtual bool BindToCurrentThread() = 0; | 53 virtual bool BindToCurrentThread() = 0; |
54 virtual GrContext* GetGrContext() = 0; | 54 virtual GrContext* GetGrContext() = 0; |
55 virtual gpu::Capabilities GetCapabilities() = 0; | 55 virtual gpu::Capabilities GetCapabilities() = 0; |
56 | 56 |
57 // Returns true if the context is driven by software emulation of GL. In | 57 // Returns true if the context is driven by software emulation of GL. In |
58 // this scenario, the compositor would not be using GPU. | 58 // this scenario, the compositor would not be using GPU. |
59 virtual bool IsSoftwareRendering() const = 0; | 59 virtual bool IsSoftwareRendering() const = 0; |
60 | 60 |
61 virtual void SetLostContextCallback(const base::Closure&) = 0; | 61 virtual void SetLostContextCallback(const base::Closure&) = 0; |
62 virtual void SetErrorMessageCallback( | 62 virtual void SetErrorMessageCallback( |
63 const base::Callback<void(const char* msg, int32_t id)>&) = 0; | 63 const base::Callback<void(const char* msg, int32_t id)>&) = 0; |
64 virtual void SignalQuery(uint32_t, const base::Closure&) = 0; | 64 virtual void SignalQuery(uint32_t, const base::Closure&) = 0; |
65 }; | 65 }; |
66 | 66 |
67 } // namespace blink | 67 } // namespace blink |
68 | 68 |
69 #endif | 69 #endif |
OLD | NEW |