| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CC_OUTPUT_RENDERER_H_ | 5 #ifndef CC_OUTPUT_RENDERER_H_ |
| 6 #define CC_OUTPUT_RENDERER_H_ | 6 #define CC_OUTPUT_RENDERER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/quads/render_pass.h" | 10 #include "cc/quads/render_pass.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 // Waits for rendering to finish. | 67 // Waits for rendering to finish. |
| 68 virtual void Finish() = 0; | 68 virtual void Finish() = 0; |
| 69 | 69 |
| 70 virtual void DoNoOp() {} | 70 virtual void DoNoOp() {} |
| 71 | 71 |
| 72 // Puts backbuffer onscreen. | 72 // Puts backbuffer onscreen. |
| 73 virtual void SwapBuffers(const CompositorFrameMetadata& metadata) = 0; | 73 virtual void SwapBuffers(const CompositorFrameMetadata& metadata) = 0; |
| 74 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} | 74 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} |
| 75 | 75 |
| 76 virtual bool IsContextLost(); | |
| 77 | |
| 78 bool visible() const { return visible_; } | 76 bool visible() const { return visible_; } |
| 79 void SetVisible(bool visible); | 77 void SetVisible(bool visible); |
| 80 | 78 |
| 81 protected: | 79 protected: |
| 82 explicit Renderer(RendererClient* client, const LayerTreeSettings* settings) | 80 explicit Renderer(RendererClient* client, const LayerTreeSettings* settings) |
| 83 : client_(client), settings_(settings), visible_(true) {} | 81 : client_(client), settings_(settings), visible_(true) {} |
| 84 | 82 |
| 85 virtual void DidChangeVisibility() = 0; | 83 virtual void DidChangeVisibility() = 0; |
| 86 | 84 |
| 87 RendererClient* client_; | 85 RendererClient* client_; |
| 88 const LayerTreeSettings* settings_; | 86 const LayerTreeSettings* settings_; |
| 89 bool visible_; | 87 bool visible_; |
| 90 | 88 |
| 91 private: | 89 private: |
| 92 DISALLOW_COPY_AND_ASSIGN(Renderer); | 90 DISALLOW_COPY_AND_ASSIGN(Renderer); |
| 93 }; | 91 }; |
| 94 | 92 |
| 95 } // namespace cc | 93 } // namespace cc |
| 96 | 94 |
| 97 #endif // CC_OUTPUT_RENDERER_H_ | 95 #endif // CC_OUTPUT_RENDERER_H_ |
| OLD | NEW |