| 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 CCRenderer_h | 5 #ifndef CCRenderer_h |
| 6 #define CCRenderer_h | 6 #define CCRenderer_h |
| 7 | 7 |
| 8 #include "CCLayerTreeHost.h" | 8 #include "CCLayerTreeHost.h" |
| 9 #include "CCRenderPass.h" | 9 #include "CCRenderPass.h" |
| 10 #include "FloatQuad.h" | 10 #include "FloatQuad.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 const CCLayerTreeSettings& settings() const { return m_client->settings(); } | 50 const CCLayerTreeSettings& settings() const { return m_client->settings(); } |
| 51 | 51 |
| 52 const IntSize& viewportSize() { return m_client->deviceViewportSize(); } | 52 const IntSize& viewportSize() { return m_client->deviceViewportSize(); } |
| 53 int viewportWidth() { return viewportSize().width(); } | 53 int viewportWidth() { return viewportSize().width(); } |
| 54 int viewportHeight() { return viewportSize().height(); } | 54 int viewportHeight() { return viewportSize().height(); } |
| 55 | 55 |
| 56 virtual void viewportChanged() { } | 56 virtual void viewportChanged() { } |
| 57 | 57 |
| 58 virtual void decideRenderPassAllocationsForFrame(const CCRenderPassList&) {
} | 58 virtual void decideRenderPassAllocationsForFrame(const CCRenderPassList&) {
} |
| 59 virtual bool haveCachedResourcesForRenderPassId(int) const { return false; } | 59 virtual bool haveCachedResourcesForRenderPassId(CCRenderPass::Id) const { re
turn false; } |
| 60 | 60 |
| 61 virtual void drawFrame(const CCRenderPassList&, const CCRenderPassIdHashMap&
) = 0; | 61 virtual void drawFrame(const CCRenderPassList&, const CCRenderPassIdHashMap&
) = 0; |
| 62 | 62 |
| 63 // waits for rendering to finish | 63 // waits for rendering to finish |
| 64 virtual void finish() = 0; | 64 virtual void finish() = 0; |
| 65 | 65 |
| 66 virtual void doNoOp() { } | 66 virtual void doNoOp() { } |
| 67 // puts backbuffer onscreen | 67 // puts backbuffer onscreen |
| 68 virtual bool swapBuffers() = 0; | 68 virtual bool swapBuffers() = 0; |
| 69 | 69 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 81 : m_client(client) | 81 : m_client(client) |
| 82 { | 82 { |
| 83 } | 83 } |
| 84 | 84 |
| 85 CCRendererClient* m_client; | 85 CCRendererClient* m_client; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } | 88 } |
| 89 | 89 |
| 90 #endif // CCRenderer_h | 90 #endif // CCRenderer_h |
| OLD | NEW |