| 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" |
| 11 #include "IntRect.h" | 11 #include "IntRect.h" |
| 12 #include <wtf/Noncopyable.h> | 12 #include <wtf/Noncopyable.h> |
| 13 #include <wtf/PassRefPtr.h> | 13 #include <wtf/PassRefPtr.h> |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 | 16 |
| 17 class CCScopedTexture; | 17 class CCScopedTexture; |
| 18 class TextureCopier; | |
| 19 class TextureUploader; | |
| 20 | |
| 21 enum TextureUploaderOption { ThrottledUploader, UnthrottledUploader }; | |
| 22 | 18 |
| 23 class CCRendererClient { | 19 class CCRendererClient { |
| 24 public: | 20 public: |
| 25 virtual const IntSize& deviceViewportSize() const = 0; | 21 virtual const IntSize& deviceViewportSize() const = 0; |
| 26 virtual const CCLayerTreeSettings& settings() const = 0; | 22 virtual const CCLayerTreeSettings& settings() const = 0; |
| 27 virtual void didLoseContext() = 0; | 23 virtual void didLoseContext() = 0; |
| 28 virtual void onSwapBuffersComplete() = 0; | 24 virtual void onSwapBuffersComplete() = 0; |
| 29 virtual void releaseContentsTextures() = 0; | 25 virtual void releaseContentsTextures() = 0; |
| 30 virtual void setFullRootLayerDamage() = 0; | 26 virtual void setFullRootLayerDamage() = 0; |
| 31 virtual void setMemoryAllocationLimitBytes(size_t) = 0; | 27 virtual void setMemoryAllocationLimitBytes(size_t) = 0; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 62 | 58 |
| 63 // waits for rendering to finish | 59 // waits for rendering to finish |
| 64 virtual void finish() = 0; | 60 virtual void finish() = 0; |
| 65 | 61 |
| 66 virtual void doNoOp() { } | 62 virtual void doNoOp() { } |
| 67 // puts backbuffer onscreen | 63 // puts backbuffer onscreen |
| 68 virtual bool swapBuffers() = 0; | 64 virtual bool swapBuffers() = 0; |
| 69 | 65 |
| 70 virtual void getFramebufferPixels(void *pixels, const IntRect&) = 0; | 66 virtual void getFramebufferPixels(void *pixels, const IntRect&) = 0; |
| 71 | 67 |
| 72 virtual TextureCopier* textureCopier() const = 0; | |
| 73 virtual TextureUploader* textureUploader() const = 0; | |
| 74 | |
| 75 virtual bool isContextLost() { return false; } | 68 virtual bool isContextLost() { return false; } |
| 76 | 69 |
| 77 virtual void setVisible(bool) = 0; | 70 virtual void setVisible(bool) = 0; |
| 78 | 71 |
| 79 protected: | 72 protected: |
| 80 explicit CCRenderer(CCRendererClient* client) | 73 explicit CCRenderer(CCRendererClient* client) |
| 81 : m_client(client) | 74 : m_client(client) |
| 82 { | 75 { |
| 83 } | 76 } |
| 84 | 77 |
| 85 CCRendererClient* m_client; | 78 CCRendererClient* m_client; |
| 86 }; | 79 }; |
| 87 | 80 |
| 88 } | 81 } |
| 89 | 82 |
| 90 #endif // CCRenderer_h | 83 #endif // CCRenderer_h |
| OLD | NEW |