Changeset 93615 in webkit
- Timestamp:
- Aug 23, 2011 11:08:46 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r93614 r93615 1 2011-08-23 Adrienne Walker <enne@google.com> 2 3 [chromium] Remove LayerRendererChromium references from TiledLayerChromium 4 https://bugs.webkit.org/show_bug.cgi?id=66433 5 6 Reviewed by James Robinson. 7 8 Covered by existing tests. 9 10 Updated TiledLayerChromium and the texture updater classes to not 11 access LayerRendererChromium or cache GraphicsContext3D. Some settings 12 like max texture size were moved from LayerRendererChromium to 13 CCLayerTreeHost in order to facilitate this refactoring. 14 15 LayerTextureUpdaterSkPicture has been #ifdef'd to only work when the 16 compositor is not threaded. It will need to be refactored more in 17 order to not own graphics resources from the main thread. 18 19 * platform/graphics/chromium/ContentLayerChromium.cpp: 20 (WebCore::ContentLayerChromium::paintContentsIfDirty): 21 (WebCore::ContentLayerChromium::createTextureUpdater): 22 * platform/graphics/chromium/ContentLayerChromium.h: 23 * platform/graphics/chromium/ImageLayerChromium.cpp: 24 (WebCore::ImageLayerTextureUpdater::create): 25 (WebCore::ImageLayerTextureUpdater::updateTextureRect): 26 (WebCore::ImageLayerTextureUpdater::ImageLayerTextureUpdater): 27 (WebCore::ImageLayerChromium::paintContentsIfDirty): 28 (WebCore::ImageLayerChromium::createTextureUpdater): 29 * platform/graphics/chromium/ImageLayerChromium.h: 30 * platform/graphics/chromium/LayerChromium.cpp: 31 (WebCore::LayerChromium::setLayerRenderer): 32 (WebCore::LayerChromium::setLayerTreeHost): 33 * platform/graphics/chromium/LayerChromium.h: 34 * platform/graphics/chromium/LayerRendererChromium.cpp: 35 * platform/graphics/chromium/LayerRendererChromium.h: 36 * platform/graphics/chromium/LayerTextureUpdater.h: 37 (WebCore::LayerTextureUpdater::LayerTextureUpdater): 38 * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: 39 (WebCore::LayerTextureUpdaterCanvas::LayerTextureUpdaterCanvas): 40 (WebCore::LayerTextureUpdaterBitmap::create): 41 (WebCore::LayerTextureUpdaterBitmap::LayerTextureUpdaterBitmap): 42 (WebCore::LayerTextureUpdaterBitmap::updateTextureRect): 43 (WebCore::LayerTextureUpdaterSkPicture::create): 44 (WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture): 45 (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): 46 * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: 47 (WebCore::LayerTextureUpdaterSkPicture::context): 48 * platform/graphics/chromium/TiledLayerChromium.cpp: 49 (WebCore::TiledLayerChromium::setLayerTreeHost): 50 (WebCore::TiledLayerChromium::updateCompositorResources): 51 (WebCore::TiledLayerChromium::invalidateRect): 52 (WebCore::TiledLayerChromium::prepareToUpdate): 53 * platform/graphics/chromium/TiledLayerChromium.h: 54 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: 55 (WebCore::CCLayerTreeHost::CCLayerTreeHost): 56 (WebCore::CCLayerTreeHost::initialize): 57 * platform/graphics/chromium/cc/CCLayerTreeHost.h: 58 (WebCore::CCLayerTreeHost::layerRenderer): 59 (WebCore::CCLayerTreeHost::contextSupportsMapSub): 60 (WebCore::CCLayerTreeHost::maxTextureSize): 61 (WebCore::CCLayerTreeHost::bestTextureFormat): 62 1 63 2011-08-23 Julien Chaffraix <jchaffraix@webkit.org> 2 64 -
trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
r93424 r93615 39 39 #include "LayerTextureUpdaterCanvas.h" 40 40 #include "PlatformBridge.h" 41 #include "cc/CCLayerTreeHost.h" 41 42 #include <wtf/CurrentTime.h> 42 43 … … 95 96 { 96 97 ASSERT(drawsContent()); 97 ASSERT(layerRenderer());98 98 99 99 updateTileSizeAndTilingOption(); … … 119 119 } 120 120 121 void ContentLayerChromium::createTextureUpdater IfNeeded()121 void ContentLayerChromium::createTextureUpdater(const CCLayerTreeHost* host) 122 122 { 123 if (m_textureUpdater) 124 return; 125 123 #if !USE(THREADED_COMPOSITING) 126 124 #if USE(SKIA) 127 if ( layerRenderer()->settings().acceleratePainting) {128 m_textureUpdater = LayerTextureUpdaterSkPicture::create( layerRendererContext(), ContentLayerPainter::create(m_owner),layerRenderer()->skiaContext());125 if (host->settings().acceleratePainting) { 126 m_textureUpdater = LayerTextureUpdaterSkPicture::create(ContentLayerPainter::create(m_owner), host->layerRenderer()->skiaContext()); 129 127 return; 130 128 } 131 #endif 132 m_textureUpdater = LayerTextureUpdaterBitmap::create(layerRendererContext(), ContentLayerPainter::create(m_owner), layerRenderer()->contextSupportsMapSub()); 129 #endif // SKIA 130 #endif // !THREADED_COMPOSITING 131 132 m_textureUpdater = LayerTextureUpdaterBitmap::create(ContentLayerPainter::create(m_owner), host->contextSupportsMapSub()); 133 133 } 134 134 -
trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
r93424 r93615 59 59 virtual void cleanupResources(); 60 60 virtual bool drawsContent() const; 61 virtual void createTextureUpdater IfNeeded();61 virtual void createTextureUpdater(const CCLayerTreeHost*); 62 62 virtual LayerTextureUpdater* textureUpdater() const { return m_textureUpdater.get(); } 63 63 -
trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
r93424 r93615 35 35 #include "ImageLayerChromium.h" 36 36 37 #include "cc/CCLayerImpl.h"38 37 #include "Image.h" 39 #include "LayerRendererChromium.h"40 #include "ManagedTexture.h"41 38 #include "LayerTextureSubImage.h" 42 39 #include "LayerTextureUpdater.h" 40 #include "ManagedTexture.h" 43 41 #include "PlatformColor.h" 42 #include "cc/CCLayerImpl.h" 43 #include "cc/CCLayerTreeHost.h" 44 44 45 45 namespace WebCore { … … 48 48 WTF_MAKE_NONCOPYABLE(ImageLayerTextureUpdater); 49 49 public: 50 static PassOwnPtr<ImageLayerTextureUpdater> create( GraphicsContext3D* context,bool useMapTexSubImage)50 static PassOwnPtr<ImageLayerTextureUpdater> create(bool useMapTexSubImage) 51 51 { 52 return adoptPtr(new ImageLayerTextureUpdater( context,useMapTexSubImage));52 return adoptPtr(new ImageLayerTextureUpdater(useMapTexSubImage)); 53 53 } 54 54 … … 68 68 } 69 69 70 virtual void updateTextureRect( ManagedTexture* texture, const IntRect& sourceRect, const IntRect& destRect)70 virtual void updateTextureRect(GraphicsContext3D* context, ManagedTexture* texture, const IntRect& sourceRect, const IntRect& destRect) 71 71 { 72 texture->bindTexture(context ());72 texture->bindTexture(context); 73 73 74 74 // Source rect should never go outside the image pixels, even if this … … 81 81 clippedDestRect.setSize(clippedSourceRect.size()); 82 82 83 m_texSubImage.upload(m_image.pixels(), imageRect(), clippedSourceRect, clippedDestRect, texture->format(), context ());83 m_texSubImage.upload(m_image.pixels(), imageRect(), clippedSourceRect, clippedDestRect, texture->format(), context); 84 84 } 85 85 … … 95 95 96 96 private: 97 ImageLayerTextureUpdater(GraphicsContext3D* context, bool useMapTexSubImage) 98 : LayerTextureUpdater(context) 99 , m_texSubImage(useMapTexSubImage) 97 explicit ImageLayerTextureUpdater(bool useMapTexSubImage) 98 : m_texSubImage(useMapTexSubImage) 100 99 { 101 100 } … … 148 147 void ImageLayerChromium::paintContentsIfDirty() 149 148 { 150 ASSERT(layerRenderer());151 152 149 if (!m_dirtyRect.isEmpty()) { 153 150 m_textureUpdater->updateFromImage(m_contents->nativeImageForCurrentFrame()); … … 183 180 } 184 181 185 void ImageLayerChromium::createTextureUpdater IfNeeded()182 void ImageLayerChromium::createTextureUpdater(const CCLayerTreeHost* host) 186 183 { 187 if (!m_textureUpdater) 188 m_textureUpdater = ImageLayerTextureUpdater::create(layerRendererContext(), layerRenderer()->contextSupportsMapSub()); 184 m_textureUpdater = ImageLayerTextureUpdater::create(host->contextSupportsMapSub()); 189 185 } 190 186 -
trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.h
r90963 r93615 65 65 66 66 virtual void cleanupResources(); 67 virtual void createTextureUpdater IfNeeded();67 virtual void createTextureUpdater(const CCLayerTreeHost*); 68 68 void setTilingOption(TilingOption); 69 69 -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
r93571 r93615 106 106 } 107 107 m_layerRenderer = renderer; 108 109 // FIXME: Once setLayerRenderer is no longer needed on the LayerChromium 110 // tree, move this call to LayerRendererChromium::paintLayerContents. 111 setLayerTreeHost(renderer->owner()); 112 } 113 114 void LayerChromium::setLayerTreeHost(CCLayerTreeHost*) 115 { 108 116 } 109 117 -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h
r93454 r93615 54 54 55 55 class CCLayerImpl; 56 class CCLayerTreeHost; 56 57 class GraphicsContext3D; 57 58 class LayerRendererChromium; … … 157 158 // FIXME, replace with CCLayerTreeHost. 158 159 virtual void setLayerRenderer(LayerRendererChromium*); 160 161 virtual void setLayerTreeHost(CCLayerTreeHost*); 159 162 160 163 void setOwner(GraphicsLayerChromium* owner) { m_owner = owner; } -
trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
r93571 r93615 46 46 #include "NonCompositedContentHost.h" 47 47 #include "NotImplemented.h" 48 #include "PlatformColor.h"49 48 #include "RenderSurfaceChromium.h" 50 49 #include "TextStream.h" … … 535 534 } 536 535 537 GC3Denum LayerRendererChromium::bestTextureFormat()538 {539 return PlatformColor::bestTextureFormat(context());540 }541 542 536 void LayerRendererChromium::viewportChanged() 543 537 { -
trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdater.h
r93424 r93615 43 43 WTF_MAKE_NONCOPYABLE(LayerTextureUpdater); 44 44 public: 45 LayerTextureUpdater() { } 45 46 virtual ~LayerTextureUpdater() { } 46 47 … … 63 64 virtual SampledTexelFormat sampledTexelFormat(GC3Denum textureFormat) = 0; 64 65 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tileSize, int borderTexels) = 0; 65 virtual void updateTextureRect(ManagedTexture*, const IntRect& sourceRect, const IntRect& destRect) = 0; 66 67 protected: 68 explicit LayerTextureUpdater(GraphicsContext3D* context) : m_context(context) { } 69 70 GraphicsContext3D* context() const { return m_context; } 71 72 private: 73 // The graphics context with which to update textures. 74 // It is assumed that the textures are either created in the same context 75 // or shared with this context. 76 GraphicsContext3D* m_context; 66 virtual void updateTextureRect(GraphicsContext3D*, ManagedTexture*, const IntRect& sourceRect, const IntRect& destRect) = 0; 77 67 }; 78 68 -
trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp
r92900 r93615 47 47 namespace WebCore { 48 48 49 LayerTextureUpdaterCanvas::LayerTextureUpdaterCanvas(GraphicsContext3D* context, PassOwnPtr<LayerPainterChromium> painter) 50 : LayerTextureUpdater(context) 51 , m_painter(painter) 49 LayerTextureUpdaterCanvas::LayerTextureUpdaterCanvas(PassOwnPtr<LayerPainterChromium> painter) 50 : m_painter(painter) 52 51 { 53 52 } … … 63 62 } 64 63 65 PassOwnPtr<LayerTextureUpdaterBitmap> LayerTextureUpdaterBitmap::create( GraphicsContext3D* context,PassOwnPtr<LayerPainterChromium> painter, bool useMapTexSubImage)66 { 67 return adoptPtr(new LayerTextureUpdaterBitmap( context,painter, useMapTexSubImage));68 } 69 70 LayerTextureUpdaterBitmap::LayerTextureUpdaterBitmap( GraphicsContext3D* context,PassOwnPtr<LayerPainterChromium> painter, bool useMapTexSubImage)71 : LayerTextureUpdaterCanvas( context,painter)64 PassOwnPtr<LayerTextureUpdaterBitmap> LayerTextureUpdaterBitmap::create(PassOwnPtr<LayerPainterChromium> painter, bool useMapTexSubImage) 65 { 66 return adoptPtr(new LayerTextureUpdaterBitmap(painter, useMapTexSubImage)); 67 } 68 69 LayerTextureUpdaterBitmap::LayerTextureUpdaterBitmap(PassOwnPtr<LayerPainterChromium> painter, bool useMapTexSubImage) 70 : LayerTextureUpdaterCanvas(painter) 72 71 , m_texSubImage(useMapTexSubImage) 73 72 { … … 95 94 } 96 95 97 void LayerTextureUpdaterBitmap::updateTextureRect( ManagedTexture* texture, const IntRect& sourceRect, const IntRect& destRect)96 void LayerTextureUpdaterBitmap::updateTextureRect(GraphicsContext3D* context, ManagedTexture* texture, const IntRect& sourceRect, const IntRect& destRect) 98 97 { 99 98 PlatformCanvas::AutoLocker locker(&m_canvas); 100 99 101 texture->bindTexture(context()); 102 m_texSubImage.upload(locker.pixels(), contentRect(), sourceRect, destRect, texture->format(), context()); 103 } 104 100 texture->bindTexture(context); 101 m_texSubImage.upload(locker.pixels(), contentRect(), sourceRect, destRect, texture->format(), context); 102 } 103 104 #if !USE(THREADED_COMPOSITING) 105 105 #if USE(SKIA) 106 PassOwnPtr<LayerTextureUpdaterSkPicture> LayerTextureUpdaterSkPicture::create( GraphicsContext3D* context,PassOwnPtr<LayerPainterChromium> painter, GrContext* skiaContext)107 { 108 return adoptPtr(new LayerTextureUpdaterSkPicture( context,painter, skiaContext));109 } 110 111 LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture( GraphicsContext3D* context,PassOwnPtr<LayerPainterChromium> painter, GrContext* skiaContext)112 : LayerTextureUpdaterCanvas( context,painter)106 PassOwnPtr<LayerTextureUpdaterSkPicture> LayerTextureUpdaterSkPicture::create(PassOwnPtr<LayerPainterChromium> painter, GrContext* skiaContext) 107 { 108 return adoptPtr(new LayerTextureUpdaterSkPicture(painter, skiaContext)); 109 } 110 111 LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture(PassOwnPtr<LayerPainterChromium> painter, GrContext* skiaContext) 112 : LayerTextureUpdaterCanvas(painter) 113 113 , m_skiaContext(skiaContext) 114 , m_context(0) 114 115 , m_createFrameBuffer(false) 115 116 , m_fbo(0) … … 146 147 } 147 148 148 void LayerTextureUpdaterSkPicture::updateTextureRect(ManagedTexture* texture, const IntRect& sourceRect, const IntRect& destRect) 149 { 149 void LayerTextureUpdaterSkPicture::updateTextureRect(GraphicsContext3D* compositorContext, ManagedTexture* texture, const IntRect& sourceRect, const IntRect& destRect) 150 { 151 ASSERT(!m_context || m_context == compositorContext); 152 m_context = compositorContext; 153 150 154 if (m_createFrameBuffer) { 151 155 deleteFrameBuffer(); … … 251 255 } 252 256 #endif // SKIA 257 #endif // !THREADED_COMPOSITING 253 258 254 259 } // namespace WebCore 255 260 #endif // USE(ACCELERATED_COMPOSITING) 256 -
trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.h
r92900 r93615 52 52 class LayerTextureUpdaterCanvas : public LayerTextureUpdater { 53 53 WTF_MAKE_NONCOPYABLE(LayerTextureUpdaterCanvas); 54 public:55 virtual ~LayerTextureUpdaterCanvas() { }56 57 54 protected: 58 LayerTextureUpdaterCanvas(GraphicsContext3D*,PassOwnPtr<LayerPainterChromium>);55 explicit LayerTextureUpdaterCanvas(PassOwnPtr<LayerPainterChromium>); 59 56 60 57 void paintContents(GraphicsContext&, const IntRect& contentRect); … … 71 68 WTF_MAKE_NONCOPYABLE(LayerTextureUpdaterBitmap); 72 69 public: 73 static PassOwnPtr<LayerTextureUpdaterBitmap> create(GraphicsContext3D*, PassOwnPtr<LayerPainterChromium>, bool useMapTexSubImage); 74 virtual ~LayerTextureUpdaterBitmap() { } 70 static PassOwnPtr<LayerTextureUpdaterBitmap> create(PassOwnPtr<LayerPainterChromium>, bool useMapTexSubImage); 75 71 76 72 virtual Orientation orientation() { return LayerTextureUpdater::BottomUpOrientation; } 77 73 virtual SampledTexelFormat sampledTexelFormat(GC3Denum textureFormat); 78 74 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tileSize, int borderTexels); 79 virtual void updateTextureRect( ManagedTexture*, const IntRect& sourceRect, const IntRect& destRect);75 virtual void updateTextureRect(GraphicsContext3D*, ManagedTexture*, const IntRect& sourceRect, const IntRect& destRect); 80 76 81 77 private: 82 LayerTextureUpdaterBitmap( GraphicsContext3D*,PassOwnPtr<LayerPainterChromium>, bool useMapTexSubImage);78 LayerTextureUpdaterBitmap(PassOwnPtr<LayerPainterChromium>, bool useMapTexSubImage); 83 79 PlatformCanvas m_canvas; 84 80 LayerTextureSubImage m_texSubImage; 85 81 }; 86 82 83 #if !USE(THREADED_COMPOSITING) 87 84 #if USE(SKIA) 88 85 class LayerTextureUpdaterSkPicture : public LayerTextureUpdaterCanvas { 89 86 WTF_MAKE_NONCOPYABLE(LayerTextureUpdaterSkPicture); 90 87 public: 91 static PassOwnPtr<LayerTextureUpdaterSkPicture> create( GraphicsContext3D*,PassOwnPtr<LayerPainterChromium>, GrContext*);88 static PassOwnPtr<LayerTextureUpdaterSkPicture> create(PassOwnPtr<LayerPainterChromium>, GrContext*); 92 89 virtual ~LayerTextureUpdaterSkPicture(); 93 90 … … 95 92 virtual SampledTexelFormat sampledTexelFormat(GC3Denum textureFormat); 96 93 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tileSize, int borderTexels); 97 virtual void updateTextureRect( ManagedTexture*, const IntRect& sourceRect, const IntRect& destRect);94 virtual void updateTextureRect(GraphicsContext3D*, ManagedTexture*, const IntRect& sourceRect, const IntRect& destRect); 98 95 99 96 private: 100 LayerTextureUpdaterSkPicture( GraphicsContext3D*,PassOwnPtr<LayerPainterChromium>, GrContext*);97 LayerTextureUpdaterSkPicture(PassOwnPtr<LayerPainterChromium>, GrContext*); 101 98 void deleteFrameBuffer(); 102 99 bool createFrameBuffer(); 100 GraphicsContext3D* context() { return m_context; } 103 101 104 102 GrContext* m_skiaContext; // SKIA graphics context. 103 GraphicsContext3D* m_context; 105 104 106 105 bool m_createFrameBuffer; // Need to create FBO if true. … … 112 111 }; 113 112 #endif // SKIA 113 #endif // !THREADED_COMPOSITING 114 114 115 115 } // namespace WebCore 116 116 #endif // USE(ACCELERATED_COMPOSITING) 117 117 #endif // LayerTextureUpdaterCanvas_h 118 -
trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
r93526 r93615 93 93 } 94 94 95 void TiledLayerChromium::setLayerRenderer(LayerRendererChromium* layerRenderer)96 {97 LayerChromium::setLayerRenderer(layerRenderer);98 createTilerIfNeeded();99 }100 101 95 void TiledLayerChromium::updateTileSizeAndTilingOption() 102 96 { … … 141 135 } 142 136 143 void TiledLayerChromium:: createTilerIfNeeded()137 void TiledLayerChromium::setLayerTreeHost(CCLayerTreeHost* host) 144 138 { 145 139 if (m_tiler) 146 140 return; 147 141 148 createTextureUpdater IfNeeded();149 150 m_textureFormat = layerRenderer()->bestTextureFormat();142 createTextureUpdater(host); 143 144 m_textureFormat = host->bestTextureFormat(); 151 145 m_textureOrientation = textureUpdater()->orientation(); 152 146 m_sampledTexelFormat = textureUpdater()->sampledTexelFormat(m_textureFormat); 153 154 147 m_tiler = CCLayerTilingData::create( 155 148 IntSize(defaultTileSize, defaultTileSize), … … 209 202 GLC(context, context->bindTexture(GraphicsContext3D::TEXTURE_2D, 0)); 210 203 211 textureUpdater()->updateTextureRect( tile->texture(), sourceRect, destRect);204 textureUpdater()->updateTextureRect(context, tile->texture(), sourceRect, destRect); 212 205 tile->clearDirty(); 213 206 } … … 328 321 void TiledLayerChromium::invalidateRect(const IntRect& contentRect) 329 322 { 330 if ( contentRect.isEmpty() || m_skipsDraw)323 if (!m_tiler || contentRect.isEmpty() || m_skipsDraw) 331 324 return; 332 325 … … 377 370 void TiledLayerChromium::prepareToUpdate(const IntRect& contentRect) 378 371 { 372 ASSERT(m_tiler); 373 379 374 m_skipsDraw = false; 380 375 -
trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h
r93438 r93615 61 61 void updateTileSizeAndTilingOption(); 62 62 63 virtual void createTextureUpdater IfNeeded() = 0;63 virtual void createTextureUpdater(const CCLayerTreeHost*) = 0; 64 64 virtual LayerTextureUpdater* textureUpdater() const = 0; 65 65 … … 77 77 virtual void dumpLayerProperties(TextStream&, int indent) const; 78 78 79 virtual void setLayer Renderer(LayerRendererChromium*);79 virtual void setLayerTreeHost(CCLayerTreeHost*); 80 80 81 81 void createTilerIfNeeded(); -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
r93360 r93615 31 31 #include "LayerRendererChromium.h" 32 32 #include "NonCompositedContentHost.h" 33 #include "PlatformColor.h" 33 34 #include "TraceEvent.h" 34 35 #include "cc/CCLayerTreeHostCommitter.h" … … 47 48 CCLayerTreeHost::CCLayerTreeHost(CCLayerTreeHostClient* client, const CCSettings& settings) 48 49 : m_recreatingGraphicsContext(false) 50 , m_maxTextureSize(0) 51 , m_contextSupportsMapSub(false) 49 52 , m_animating(false) 50 53 , m_client(client) … … 60 63 if (!m_layerRenderer) 61 64 return false; 65 66 // FIXME: In the threaded case, these values will need to be initialized 67 // by something other than m_layerRenderer. 68 m_maxTextureSize = m_layerRenderer->maxTextureSize(); 69 m_bestTextureFormat = PlatformColor::bestTextureFormat(m_layerRenderer->context()); 70 m_contextSupportsMapSub = m_layerRenderer->contextSupportsMapSub(); 62 71 63 72 m_rootLayer = GraphicsLayer::create(0); -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
r93360 r93615 26 26 #define CCLayerTreeHost_h 27 27 28 #include "GraphicsTypes3D.h" 28 29 #include "IntRect.h" 29 30 #include "cc/CCLayerTreeHostCommitter.h" … … 114 115 #if !USE(THREADED_COMPOSITING) 115 116 void composite(bool finish); 117 LayerRendererChromium* layerRenderer() const { return m_layerRenderer.get(); } 116 118 #endif 117 119 118 120 NonCompositedContentHost* nonCompositedContentHost() const { return m_nonCompositedContentHost.get(); } 121 122 bool contextSupportsMapSub() const { return m_contextSupportsMapSub; } 123 int maxTextureSize() const { return m_maxTextureSize; } 124 GC3Denum bestTextureFormat() { return m_bestTextureFormat; } 119 125 120 126 protected: … … 134 140 RefPtr<LayerRendererChromium> m_layerRenderer; 135 141 #endif 142 143 int m_maxTextureSize; 144 GC3Denum m_bestTextureFormat; 145 bool m_contextSupportsMapSub; 136 146 137 147 bool m_animating;
Note: See TracChangeset
for help on using the changeset viewer.