| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "gpu/command_buffer/service/in_process_command_buffer.h" | 10 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 // Allows changing or resetting the client to NULL (this must be used if | 57 // Allows changing or resetting the client to NULL (this must be used if |
| 58 // the client is being deleted prior to the DidDestroyCompositor() call | 58 // the client is being deleted prior to the DidDestroyCompositor() call |
| 59 // being received by the client). Ownership of |client| remains with | 59 // being received by the client). Ownership of |client| remains with |
| 60 // the caller. | 60 // the caller. |
| 61 virtual void SetClient(SynchronousCompositorClient* client) = 0; | 61 virtual void SetClient(SynchronousCompositorClient* client) = 0; |
| 62 | 62 |
| 63 static void SetGpuService( | 63 static void SetGpuService( |
| 64 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 64 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); |
| 65 | 65 |
| 66 static void DisableRecordDocumentWorkaround(); |
| 67 |
| 66 // Synchronously initialize compositor for hardware draw. Can only be called | 68 // Synchronously initialize compositor for hardware draw. Can only be called |
| 67 // while compositor is in software only mode, either after compositor is | 69 // while compositor is in software only mode, either after compositor is |
| 68 // first created or after ReleaseHwDraw is called. It is invalid to | 70 // first created or after ReleaseHwDraw is called. It is invalid to |
| 69 // DemandDrawHw before this returns true. | 71 // DemandDrawHw before this returns true. |
| 70 virtual bool InitializeHwDraw() = 0; | 72 virtual bool InitializeHwDraw() = 0; |
| 71 | 73 |
| 72 // Reverse of InitializeHwDraw above. Can only be called while hardware draw | 74 // Reverse of InitializeHwDraw above. Can only be called while hardware draw |
| 73 // is already initialized. Brings compositor back to software only mode and | 75 // is already initialized. Brings compositor back to software only mode and |
| 74 // releases all hardware resources. | 76 // releases all hardware resources. |
| 75 virtual void ReleaseHwDraw() = 0; | 77 virtual void ReleaseHwDraw() = 0; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 104 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset). | 106 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset). |
| 105 virtual void DidChangeRootLayerScrollOffset() = 0; | 107 virtual void DidChangeRootLayerScrollOffset() = 0; |
| 106 | 108 |
| 107 protected: | 109 protected: |
| 108 virtual ~SynchronousCompositor() {} | 110 virtual ~SynchronousCompositor() {} |
| 109 }; | 111 }; |
| 110 | 112 |
| 111 } // namespace content | 113 } // namespace content |
| 112 | 114 |
| 113 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 115 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| OLD | NEW |