| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 // Puts backbuffer onscreen. | 71 // Puts backbuffer onscreen. |
| 72 virtual void SwapBuffers(const CompositorFrameMetadata& metadata) = 0; | 72 virtual void SwapBuffers(const CompositorFrameMetadata& metadata) = 0; |
| 73 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} | 73 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} |
| 74 | 74 |
| 75 virtual bool IsContextLost(); | 75 virtual bool IsContextLost(); |
| 76 | 76 |
| 77 bool visible() const { return visible_; } | 77 bool visible() const { return visible_; } |
| 78 void SetVisible(bool visible); | 78 void SetVisible(bool visible); |
| 79 | 79 |
| 80 virtual void SendManagedMemoryStats(size_t bytes_visible, | |
| 81 size_t bytes_visible_and_nearby, | |
| 82 size_t bytes_allocated) = 0; | |
| 83 | |
| 84 protected: | 80 protected: |
| 85 explicit Renderer(RendererClient* client, const LayerTreeSettings* settings) | 81 explicit Renderer(RendererClient* client, const LayerTreeSettings* settings) |
| 86 : client_(client), settings_(settings), visible_(true) {} | 82 : client_(client), settings_(settings), visible_(true) {} |
| 87 | 83 |
| 88 virtual void DidChangeVisibility() = 0; | 84 virtual void DidChangeVisibility() = 0; |
| 89 | 85 |
| 90 RendererClient* client_; | 86 RendererClient* client_; |
| 91 const LayerTreeSettings* settings_; | 87 const LayerTreeSettings* settings_; |
| 92 bool visible_; | 88 bool visible_; |
| 93 | 89 |
| 94 private: | 90 private: |
| 95 DISALLOW_COPY_AND_ASSIGN(Renderer); | 91 DISALLOW_COPY_AND_ASSIGN(Renderer); |
| 96 }; | 92 }; |
| 97 | 93 |
| 98 } // namespace cc | 94 } // namespace cc |
| 99 | 95 |
| 100 #endif // CC_OUTPUT_RENDERER_H_ | 96 #endif // CC_OUTPUT_RENDERER_H_ |
| OLD | NEW |