diff options
Diffstat (limited to 'cc/direct_renderer.h')
-rw-r--r-- | cc/direct_renderer.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/cc/direct_renderer.h b/cc/direct_renderer.h index d3156ff..edf4001 100644 --- a/cc/direct_renderer.h +++ b/cc/direct_renderer.h @@ -12,32 +12,32 @@ namespace cc { -class ResourceProvider; +class CCResourceProvider; // This is the base class for code shared between the GL and software // renderer implementations. "Direct" refers to the fact that it does not // delegate rendering to another compositor. -class DirectRenderer : public Renderer { +class CCDirectRenderer : public CCRenderer { public: - virtual ~DirectRenderer(); + virtual ~CCDirectRenderer(); - ResourceProvider* resourceProvider() const { return m_resourceProvider; } + CCResourceProvider* resourceProvider() const { return m_resourceProvider; } - virtual void decideRenderPassAllocationsForFrame(const RenderPassList& renderPassesInDrawOrder) OVERRIDE; - virtual bool haveCachedResourcesForRenderPassId(RenderPass::Id) const OVERRIDE; - virtual void drawFrame(const RenderPassList& renderPassesInDrawOrder, const RenderPassIdHashMap& renderPassesById) OVERRIDE; + virtual void decideRenderPassAllocationsForFrame(const CCRenderPassList& renderPassesInDrawOrder) OVERRIDE; + virtual bool haveCachedResourcesForRenderPassId(CCRenderPass::Id) const OVERRIDE; + virtual void drawFrame(const CCRenderPassList& renderPassesInDrawOrder, const CCRenderPassIdHashMap& renderPassesById) OVERRIDE; protected: - DirectRenderer(RendererClient* client, ResourceProvider* resourceProvider); + CCDirectRenderer(CCRendererClient* client, CCResourceProvider* resourceProvider); struct DrawingFrame { DrawingFrame(); ~DrawingFrame(); - const RenderPassIdHashMap* renderPassesById; - const RenderPass* rootRenderPass; - const RenderPass* currentRenderPass; - const ScopedTexture* currentTexture; + const CCRenderPassIdHashMap* renderPassesById; + const CCRenderPass* rootRenderPass; + const CCRenderPass* currentRenderPass; + const CCScopedTexture* currentTexture; FloatRect rootDamageRect; @@ -47,9 +47,9 @@ protected: FloatRect scissorRectInRenderPassSpace; }; - class CachedTexture : public ScopedTexture { + class CachedTexture : public CCScopedTexture { public: - static scoped_ptr<CachedTexture> create(ResourceProvider* resourceProvider) { + static scoped_ptr<CachedTexture> create(CCResourceProvider* resourceProvider) { return make_scoped_ptr(new CachedTexture(resourceProvider)); } virtual ~CachedTexture() {} @@ -58,8 +58,8 @@ protected: void setIsComplete(bool isComplete) { m_isComplete = isComplete; } protected: - explicit CachedTexture(ResourceProvider* resourceProvider) - : ScopedTexture(resourceProvider) + explicit CachedTexture(CCResourceProvider* resourceProvider) + : CCScopedTexture(resourceProvider) , m_isComplete(false) { } @@ -75,29 +75,29 @@ protected: static void initializeMatrices(DrawingFrame&, const IntRect& drawRect, bool flipY); static IntRect moveScissorToWindowSpace(const DrawingFrame&, FloatRect scissorRect); - bool haveCachedResources(RenderPass::Id) const; - static IntSize renderPassTextureSize(const RenderPass*); - static GLenum renderPassTextureFormat(const RenderPass*); + bool haveCachedResources(CCRenderPass::Id) const; + static IntSize renderPassTextureSize(const CCRenderPass*); + static GLenum renderPassTextureFormat(const CCRenderPass*); - void drawRenderPass(DrawingFrame&, const RenderPass*); - bool useRenderPass(DrawingFrame&, const RenderPass*); + void drawRenderPass(DrawingFrame&, const CCRenderPass*); + bool useRenderPass(DrawingFrame&, const CCRenderPass*); virtual void bindFramebufferToOutputSurface(DrawingFrame&) = 0; - virtual bool bindFramebufferToTexture(DrawingFrame&, const ScopedTexture*, const IntRect& framebufferRect) = 0; + virtual bool bindFramebufferToTexture(DrawingFrame&, const CCScopedTexture*, const IntRect& framebufferRect) = 0; virtual void setDrawViewportSize(const IntSize&) = 0; virtual void enableScissorTestRect(const IntRect& scissorRect) = 0; virtual void disableScissorTest() = 0; virtual void clearFramebuffer(DrawingFrame&) = 0; - virtual void drawQuad(DrawingFrame&, const DrawQuad*) = 0; + virtual void drawQuad(DrawingFrame&, const CCDrawQuad*) = 0; virtual void beginDrawingFrame(DrawingFrame&) = 0; virtual void finishDrawingFrame(DrawingFrame&) = 0; virtual bool flippedFramebuffer() const = 0; - ScopedPtrHashMap<RenderPass::Id, CachedTexture> m_renderPassTextures; - ResourceProvider* m_resourceProvider; + ScopedPtrHashMap<CCRenderPass::Id, CachedTexture> m_renderPassTextures; + CCResourceProvider* m_resourceProvider; private: - DISALLOW_COPY_AND_ASSIGN(DirectRenderer); + DISALLOW_COPY_AND_ASSIGN(CCDirectRenderer); }; } // namespace cc |