Changeset 90492 in webkit
- Timestamp:
- Jul 6, 2011 1:56:28 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r90486 r90492 1 2011-07-01 James Robinson <jamesr@chromium.org> 2 3 Reviewed by Stephen White. 4 5 [chromium] Externalize layer visibility calculation 6 https://bugs.webkit.org/show_bug.cgi?id=63847 7 8 This moves the layer visibility calculation from the layer itself out to LayerRendererChromium, like the other 9 calculated properties. Previously, we were doing this calculating at paint time and again at draw time and 10 relying on the fact that this produced the same value. This avoids the redundant calculation. 11 12 Covered by existing compositing/ layout tests. 13 14 * platform/graphics/chromium/ContentLayerChromium.cpp: 15 (WebCore::ContentLayerChromium::ContentLayerChromium): 16 (WebCore::ContentLayerChromium::paintContentsIfDirty): 17 (WebCore::ContentLayerChromium::tilingTransform): 18 (WebCore::ContentLayerChromium::contentBounds): 19 (WebCore::ContentLayerChromium::updateLayerSize): 20 (WebCore::ContentLayerChromium::draw): 21 (WebCore::ContentLayerChromium::setTilingOption): 22 (WebCore::ContentLayerChromium::setIsMask): 23 * platform/graphics/chromium/ContentLayerChromium.h: 24 * platform/graphics/chromium/ImageLayerChromium.cpp: 25 (WebCore::ImageLayerChromium::paintContentsIfDirty): 26 (WebCore::ImageLayerChromium::contentBounds): 27 * platform/graphics/chromium/ImageLayerChromium.h: 28 * platform/graphics/chromium/LayerChromium.cpp: 29 (WebCore::LayerChromium::pushPropertiesTo): 30 * platform/graphics/chromium/LayerChromium.h: 31 (WebCore::LayerChromium::contentBounds): 32 (WebCore::LayerChromium::visibleLayerRect): 33 (WebCore::LayerChromium::setVisibleLayerRect): 34 (WebCore::LayerChromium::draw): 35 * platform/graphics/chromium/LayerRendererChromium.cpp: 36 (WebCore::calculateVisibleLayerRect): 37 (WebCore::LayerRendererChromium::paintLayerContents): 38 (WebCore::LayerRendererChromium::drawLayer): 39 * platform/graphics/chromium/RenderSurfaceChromium.cpp: 40 (WebCore::RenderSurfaceChromium::draw): 41 * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: 42 (WebCore::CCCanvasLayerImpl::draw): 43 * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: 44 * platform/graphics/chromium/cc/CCLayerImpl.cpp: 45 (WebCore::CCLayerImpl::draw): 46 * platform/graphics/chromium/cc/CCLayerImpl.h: 47 (WebCore::CCLayerImpl::contentBounds): 48 (WebCore::CCLayerImpl::setContentBounds): 49 (WebCore::CCLayerImpl::visibleLayerRect): 50 (WebCore::CCLayerImpl::setVisibleLayerRect): 51 (WebCore::CCLayerImpl::doubleSided): 52 (WebCore::CCLayerImpl::setDoubleSided): 53 * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: 54 (WebCore::CCPluginLayerImpl::draw): 55 * platform/graphics/chromium/cc/CCPluginLayerImpl.h: 56 * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: 57 (WebCore::CCVideoLayerImpl::draw): 58 * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 59 1 60 2011-07-06 John Sullivan <sullivan@apple.com> 2 61 -
trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
r90260 r90492 93 93 : LayerChromium(owner) 94 94 , m_tilingOption(ContentLayerChromium::AutoTile) 95 , m_isMask(false)96 95 { 97 96 } … … 102 101 } 103 102 104 void ContentLayerChromium::paintContentsIfDirty( const IntRect& targetSurfaceRect)103 void ContentLayerChromium::paintContentsIfDirty() 105 104 { 106 105 ASSERT(drawsContent()); 107 106 ASSERT(layerRenderer()); 108 107 109 updateLayerSize( layerBounds().size());110 111 IntRect layerRect = visibleLayerRect(targetSurfaceRect);108 updateLayerSize(); 109 110 const IntRect& layerRect = visibleLayerRect(); 112 111 if (layerRect.isEmpty()) 113 112 return; 114 113 115 114 IntRect dirty = enclosingIntRect(m_dirtyRect); 116 dirty.intersect( layerBounds());115 dirty.intersect(IntRect(IntPoint(), contentBounds())); 117 116 m_tiler->invalidateRect(dirty); 118 117 … … 153 152 { 154 153 TransformationMatrix transform = ccLayerImpl()->drawTransform(); 155 // Tiler draws from the upper left corner. The draw transform 156 // specifies the middle of the layer. 157 IntSize size = bounds(); 158 transform.translate(-size.width() / 2.0, -size.height() / 2.0); 154 155 if (contentBounds().isEmpty()) 156 return transform; 157 158 transform.scaleNonUniform(bounds().width() / static_cast<double>(contentBounds().width()), 159 bounds().height() / static_cast<double>(contentBounds().height())); 160 161 // Tiler draws with a different origin from other layers. 162 transform.translate(-contentBounds().width() / 2.0, -contentBounds().height() / 2.0); 159 163 160 164 return transform; 161 165 } 162 166 163 IntRect ContentLayerChromium::visibleLayerRect(const IntRect& targetSurfaceRect) 164 { 165 if (targetSurfaceRect.isEmpty()) 166 return targetSurfaceRect; 167 168 const IntRect layerBoundRect = layerBounds(); 169 170 // Mask layers don't have their own draw transform so we return the entire 171 // layer bounds as the visible rect. 172 if (m_isMask) 173 return layerBoundRect; 174 175 const TransformationMatrix transform = tilingTransform(); 176 177 // Is this layer fully contained within the target surface? 178 IntRect layerInSurfaceSpace = transform.mapRect(layerBoundRect); 179 if (targetSurfaceRect.contains(layerInSurfaceSpace)) 180 return layerBoundRect; 181 182 // If the layer doesn't fill up the entire surface, then find the part of 183 // the surface rect where the layer could be visible. This avoids trying to 184 // project surface rect points that are behind the projection point. 185 IntRect minimalSurfaceRect = targetSurfaceRect; 186 minimalSurfaceRect.intersect(layerInSurfaceSpace); 187 188 // Project the corners of the target surface rect into the layer space. 189 // This bounding rectangle may be larger than it needs to be (being 190 // axis-aligned), but is a reasonable filter on the space to consider. 191 // Non-invertible transforms will create an empty rect here. 192 const TransformationMatrix surfaceToLayer = transform.inverse(); 193 IntRect layerRect = surfaceToLayer.projectQuad(FloatQuad(FloatRect(minimalSurfaceRect))).enclosingBoundingBox(); 194 layerRect.intersect(layerBoundRect); 195 return layerRect; 196 } 197 198 IntRect ContentLayerChromium::layerBounds() const 199 { 200 return IntRect(IntPoint(0, 0), bounds()); 201 } 202 203 void ContentLayerChromium::updateLayerSize(const IntSize& layerSize) 167 IntSize ContentLayerChromium::contentBounds() const 168 { 169 return bounds(); 170 } 171 172 void ContentLayerChromium::updateLayerSize() 204 173 { 205 174 if (!m_tiler) 206 175 return; 207 176 208 const IntSize tileSize(min(defaultTileSize, layerSize.width()), min(defaultTileSize, layerSize.height()));177 const IntSize tileSize(min(defaultTileSize, contentBounds().width()), min(defaultTileSize, contentBounds().height())); 209 178 210 179 // Tile if both dimensions large, or any one dimension large and the other 211 180 // extends into a second tile. This heuristic allows for long skinny layers 212 181 // (e.g. scrollbars) that are Nx1 tiles to minimize wasted texture space. 213 const bool anyDimensionLarge = layerSize.width() > maxUntiledSize || layerSize.height() > maxUntiledSize;214 const bool anyDimensionOneTile = layerSize.width() <= defaultTileSize || layerSize.height() <= defaultTileSize;182 const bool anyDimensionLarge = contentBounds().width() > maxUntiledSize || contentBounds().height() > maxUntiledSize; 183 const bool anyDimensionOneTile = contentBounds().width() <= defaultTileSize || contentBounds().height() <= defaultTileSize; 215 184 const bool autoTiled = anyDimensionLarge && !anyDimensionOneTile; 216 185 … … 223 192 isTiled = autoTiled; 224 193 225 IntSize requestedSize = isTiled ? tileSize : layerSize;194 IntSize requestedSize = isTiled ? tileSize : contentBounds(); 226 195 const int maxSize = layerRenderer()->maxTextureSize(); 227 196 IntSize clampedSize = requestedSize.shrunkTo(IntSize(maxSize, maxSize)); … … 229 198 } 230 199 231 void ContentLayerChromium::draw(const IntRect& targetSurfaceRect) 232 { 233 const TransformationMatrix transform = tilingTransform(); 234 IntRect layerRect = visibleLayerRect(targetSurfaceRect); 200 void ContentLayerChromium::draw() 201 { 202 const IntRect& layerRect = visibleLayerRect(); 235 203 if (!layerRect.isEmpty()) 236 m_tiler->draw(layerRect, t ransform, ccLayerImpl()->drawOpacity(), m_textureUpdater.get());204 m_tiler->draw(layerRect, tilingTransform(), ccLayerImpl()->drawOpacity(), m_textureUpdater.get()); 237 205 } 238 206 … … 272 240 { 273 241 m_tilingOption = option; 274 updateLayerSize( bounds());242 updateLayerSize(); 275 243 } 276 244 … … 290 258 { 291 259 setTilingOption(isMask ? NeverTile : AutoTile); 292 m_isMask = isMask;293 260 } 294 261 -
trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
r90260 r90492 53 53 virtual ~ContentLayerChromium(); 54 54 55 virtual void paintContentsIfDirty( const IntRect& targetSurfaceRect);55 virtual void paintContentsIfDirty(); 56 56 virtual void updateCompositorResources(); 57 57 virtual void setIsMask(bool); 58 58 virtual void bindContentsTexture(); 59 59 60 virtual void draw( const IntRect& targetSurfaceRect);60 virtual void draw(); 61 61 virtual bool drawsContent() const; 62 62 … … 70 70 virtual void setLayerRenderer(LayerRendererChromium*); 71 71 72 virtual Int Rect layerBounds() const;72 virtual IntSize contentBounds() const; 73 73 74 virtualTransformationMatrix tilingTransform();74 TransformationMatrix tilingTransform(); 75 75 76 // For a given render surface rect that this layer will be transformed and 77 // drawn into, return the layer space rect that is visible in that surface. 78 IntRect visibleLayerRect(const IntRect&); 79 80 void updateLayerSize(const IntSize&); 76 void updateLayerSize(); 81 77 void createTilerIfNeeded(); 82 78 virtual void createTextureUpdaterIfNeeded(); … … 86 82 OwnPtr<LayerTilerChromium> m_tiler; 87 83 TilingOption m_tilingOption; 88 bool m_isMask;89 84 }; 90 85 -
trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
r90260 r90492 141 141 } 142 142 143 void ImageLayerChromium::paintContentsIfDirty( const IntRect& targetSurfaceRect)143 void ImageLayerChromium::paintContentsIfDirty() 144 144 { 145 145 ASSERT(layerRenderer()); … … 149 149 ImageLayerTextureUpdater* imageTextureUpdater = static_cast<ImageLayerTextureUpdater*>(m_textureUpdater.get()); 150 150 imageTextureUpdater->updateFromImage(m_contents->nativeImageForCurrentFrame()); 151 updateLayerSize( imageTextureUpdater->imageSize());152 IntRect paintRect(IntPoint( 0, 0), imageTextureUpdater->imageSize());151 updateLayerSize(); 152 IntRect paintRect(IntPoint(), contentBounds()); 153 153 if (!m_dirtyRect.isEmpty()) { 154 154 m_tiler->invalidateRect(paintRect); … … 156 156 } 157 157 } 158 IntRect layerRect = visibleLayerRect(targetSurfaceRect);159 if (layerRect.isEmpty())160 return;161 158 162 m_tiler->prepareToUpdate( layerRect, m_textureUpdater.get());159 m_tiler->prepareToUpdate(visibleLayerRect(), m_textureUpdater.get()); 163 160 } 164 161 … … 166 163 { 167 164 m_tiler->updateRect(m_textureUpdater.get()); 168 }169 170 void ImageLayerChromium::setLayerRenderer(LayerRendererChromium* newLayerRenderer)171 {172 if (newLayerRenderer != layerRenderer())173 m_textureUpdater.clear();174 ContentLayerChromium::setLayerRenderer(newLayerRenderer);175 165 } 176 166 … … 181 171 } 182 172 183 Int Rect ImageLayerChromium::layerBounds() const173 IntSize ImageLayerChromium::contentBounds() const 184 174 { 185 if (!m_textureUpdater) 186 return IntRect(); 187 ImageLayerTextureUpdater* imageTextureUpdater = static_cast<ImageLayerTextureUpdater*>(m_textureUpdater.get()); 188 return IntRect(IntPoint(), imageTextureUpdater->imageSize()); 189 } 190 191 TransformationMatrix ImageLayerChromium::tilingTransform() 192 { 193 // Tiler draws from the upper left corner. The draw transform 194 // specifies the middle of the layer. 195 TransformationMatrix transform = ccLayerImpl()->drawTransform(); 196 const IntRect sourceRect = layerBounds(); 197 const IntSize destSize = bounds(); 198 199 transform.translate(-destSize.width() / 2.0, -destSize.height() / 2.0); 200 201 // Tiler also draws at the original content size, so rescale the original 202 // image dimensions to the bounds that it is meant to be drawn at. 203 float scaleX = destSize.width() / static_cast<float>(sourceRect.size().width()); 204 float scaleY = destSize.height() / static_cast<float>(sourceRect.size().height()); 205 transform.scale3d(scaleX, scaleY, 1.0f); 206 207 return transform; 175 return m_contents->size(); 208 176 } 209 177 -
trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.h
r89647 r90492 52 52 virtual ~ImageLayerChromium(); 53 53 54 virtual void paintContentsIfDirty( const IntRect& targetSurfaceRect);54 virtual void paintContentsIfDirty(); 55 55 virtual void updateCompositorResources(); 56 56 virtual bool drawsContent() const { return m_contents; } … … 61 61 virtual const char* layerTypeAsString() const { return "ImageLayer"; } 62 62 63 virtual void setLayerRenderer(LayerRendererChromium*); 64 65 virtual TransformationMatrix tilingTransform(); 66 virtual IntRect layerBounds() const; 63 virtual IntSize contentBounds() const; 67 64 68 65 private: -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
r86652 r90492 292 292 layer->setAnchorPointZ(m_anchorPointZ); 293 293 layer->setBounds(m_bounds); 294 layer->setContentBounds(contentBounds()); 294 295 layer->setDebugBorderColor(m_debugBorderColor); 295 296 layer->setDebugBorderWidth(m_debugBorderWidth); … … 303 304 layer->setSublayerTransform(m_sublayerTransform); 304 305 layer->setTransform(m_transform); 306 layer->setVisibleLayerRect(m_visibleLayerRect); 305 307 306 308 if (maskLayer()) -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h
r87942 r90492 87 87 void setBounds(const IntSize&); 88 88 const IntSize& bounds() const { return m_bounds; } 89 virtual IntSize contentBounds() const { return bounds(); } 89 90 90 91 void setClearsContext(bool clears) { m_clearsContext = clears; setNeedsCommit(); } … … 133 134 const TransformationMatrix& transform() const { return m_transform; } 134 135 136 const IntRect& visibleLayerRect() const { return m_visibleLayerRect; } 137 void setVisibleLayerRect(const IntRect& visibleLayerRect) { m_visibleLayerRect = visibleLayerRect; } 138 135 139 bool doubleSided() const { return m_doubleSided; } 136 140 void setDoubleSided(bool doubleSided) { m_doubleSided = doubleSided; setNeedsCommit(); } … … 153 157 // These methods typically need to be overwritten by derived classes. 154 158 virtual bool drawsContent() const { return false; } 155 virtual void paintContentsIfDirty(const IntRect&) { }156 159 virtual void paintContentsIfDirty() { } 157 160 virtual void updateCompositorResources() { } … … 159 162 virtual void unreserveContentsTexture() { } 160 163 virtual void bindContentsTexture() { } 161 virtual void draw( const IntRect&) { }164 virtual void draw() { } 162 165 163 166 // These exists just for debugging (via drawDebugBorder()). … … 250 253 // Layer properties. 251 254 IntSize m_bounds; 255 IntRect m_visibleLayerRect; 252 256 FloatPoint m_position; 253 257 FloatPoint m_anchorPoint; -
trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
r90283 r90492 359 359 } 360 360 361 static IntRect calculateVisibleLayerRect(const IntRect& targetSurfaceRect, const IntSize& bounds, const IntSize& contentBounds, const TransformationMatrix& tilingTransform) 362 { 363 if (targetSurfaceRect.isEmpty() || contentBounds.isEmpty()) 364 return targetSurfaceRect; 365 366 const IntRect layerBoundRect = IntRect(IntPoint(), contentBounds); 367 TransformationMatrix transform = tilingTransform; 368 369 transform.scaleNonUniform(bounds.width() / static_cast<double>(contentBounds.width()), 370 bounds.height() / static_cast<double>(contentBounds.height())); 371 transform.translate(-contentBounds.width() / 2.0, -contentBounds.height() / 2.0); 372 373 // Is this layer fully contained within the target surface? 374 IntRect layerInSurfaceSpace = transform.mapRect(layerBoundRect); 375 if (targetSurfaceRect.contains(layerInSurfaceSpace)) 376 return layerBoundRect; 377 378 // If the layer doesn't fill up the entire surface, then find the part of 379 // the surface rect where the layer could be visible. This avoids trying to 380 // project surface rect points that are behind the projection point. 381 IntRect minimalSurfaceRect = targetSurfaceRect; 382 minimalSurfaceRect.intersect(layerInSurfaceSpace); 383 384 // Project the corners of the target surface rect into the layer space. 385 // This bounding rectangle may be larger than it needs to be (being 386 // axis-aligned), but is a reasonable filter on the space to consider. 387 // Non-invertible transforms will create an empty rect here. 388 const TransformationMatrix surfaceToLayer = transform.inverse(); 389 IntRect layerRect = surfaceToLayer.projectQuad(FloatQuad(FloatRect(minimalSurfaceRect))).enclosingBoundingBox(); 390 layerRect.intersect(layerBoundRect); 391 return layerRect; 392 } 393 394 static void paintContentsIfDirty(LayerChromium* layer, const IntRect& visibleLayerRect) 395 { 396 if (layer->drawsContent()) { 397 layer->setVisibleLayerRect(visibleLayerRect); 398 layer->paintContentsIfDirty(); 399 } 400 } 401 361 402 void LayerRendererChromium::paintLayerContents(const LayerList& renderSurfaceLayerList) 362 403 { … … 399 440 400 441 if (layer->bounds().isEmpty()) 401 continue;442 continue; 402 443 403 444 IntRect targetSurfaceRect = ccLayerImpl->targetRenderSurface() ? ccLayerImpl->targetRenderSurface()->contentRect() : m_defaultRenderSurface->contentRect(); 404 445 if (layer->ccLayerImpl()->usesLayerScissor()) 405 446 targetSurfaceRect.intersect(layer->ccLayerImpl()->scissorRect()); 406 407 if (layer->drawsContent()) 408 layer->paintContentsIfDirty(targetSurfaceRect); 409 if (layer->maskLayer() && layer->maskLayer()->drawsContent()) 410 layer->maskLayer()->paintContentsIfDirty(targetSurfaceRect); 411 if (layer->replicaLayer() && layer->replicaLayer()->drawsContent()) 412 layer->replicaLayer()->paintContentsIfDirty(targetSurfaceRect); 413 if (layer->replicaLayer() && layer->replicaLayer()->maskLayer() && layer->replicaLayer()->maskLayer()->drawsContent()) 414 layer->replicaLayer()->maskLayer()->paintContentsIfDirty(targetSurfaceRect); 447 IntRect visibleLayerRect = calculateVisibleLayerRect(targetSurfaceRect, layer->bounds(), layer->contentBounds(), ccLayerImpl->drawTransform()); 448 449 paintContentsIfDirty(layer, visibleLayerRect); 450 451 if (LayerChromium* maskLayer = layer->maskLayer()) { 452 paintContentsIfDirty(maskLayer, IntRect(IntPoint(), maskLayer->contentBounds())); 453 } 454 455 if (LayerChromium* replicaLayer = layer->replicaLayer()) { 456 paintContentsIfDirty(replicaLayer, visibleLayerRect); 457 458 if (LayerChromium* replicaMaskLayer = replicaLayer->maskLayer()) { 459 paintContentsIfDirty(replicaMaskLayer, IntRect(IntPoint(), replicaMaskLayer->contentBounds())); 460 } 461 } 415 462 } 416 463 } … … 986 1033 } 987 1034 988 layer->draw( targetSurfaceRect);1035 layer->draw(); 989 1036 990 1037 // Draw the debug border if there is one. -
trunk/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.cpp
r90260 r90492 167 167 168 168 // Reflection draws before the layer. 169 if (m_owningLayer->replicaLayer()) 169 if (m_owningLayer->replicaLayer()) 170 170 drawSurface(replicaMaskLayer, m_replicaDrawTransform); 171 171 -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp
r86975 r90492 49 49 } 50 50 51 void CCCanvasLayerImpl::draw( const IntRect&)51 void CCCanvasLayerImpl::draw() 52 52 { 53 53 ASSERT(layerRenderer()); -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCCanvasLayerImpl.h
r86905 r90492 43 43 typedef ProgramBinding<VertexShaderPosTex, FragmentShaderRGBATexFlipAlpha> Program; 44 44 45 virtual void draw( const IntRect&);45 virtual void draw(); 46 46 47 47 virtual void dumpLayerProperties(TextStream&, int indent) const; -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp
r88496 r90492 143 143 } 144 144 145 void CCLayerImpl::draw( const IntRect& targetSurfaceRect)146 { 147 return m_owner->draw( targetSurfaceRect);145 void CCLayerImpl::draw() 146 { 147 return m_owner->draw(); 148 148 } 149 149 -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h
r88496 r90492 70 70 #endif 71 71 72 virtual void draw( const IntRect& contentRect);72 virtual void draw(); 73 73 virtual void updateCompositorResources(); 74 74 void unreserveContentsTexture(); … … 128 128 RenderSurfaceChromium* renderSurface() const { return m_renderSurface.get(); } 129 129 void clearRenderSurface() { m_renderSurface.clear(); } 130 130 131 float drawOpacity() const { return m_drawOpacity; } 131 132 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; } 133 132 134 const IntRect& scissorRect() const { return m_scissorRect; } 133 135 void setScissorRect(const IntRect& rect) { m_scissorRect = rect; } 136 134 137 RenderSurfaceChromium* targetRenderSurface() const { return m_targetRenderSurface; } 135 138 void setTargetRenderSurface(RenderSurfaceChromium* surface) { m_targetRenderSurface = surface; } 136 139 140 const IntSize& bounds() const { return m_bounds; } 141 void setBounds(const IntSize& bounds) { m_bounds = bounds; } 142 143 const IntSize& contentBounds() const { return m_contentBounds; } 144 void setContentBounds(const IntSize& contentBounds) { m_contentBounds = contentBounds; } 145 146 const IntRect& visibleLayerRect() const { return m_visibleLayerRect; } 147 void setVisibleLayerRect(const IntRect& visibleLayerRect) { m_visibleLayerRect = visibleLayerRect; } 148 137 149 bool doubleSided() const { return m_doubleSided; } 138 150 void setDoubleSided(bool doubleSided) { m_doubleSided = doubleSided; } 139 const IntSize& bounds() const { return m_bounds; }140 void setBounds(const IntSize& bounds) { m_bounds = bounds; }141 151 142 152 // Returns the rect containtaining this layer in the current view's coordinate system. … … 153 163 LayerChromium* owner() const { return m_owner; } 154 164 void clearOwner() { m_owner = 0; } 165 155 166 protected: 156 167 // For now, CCLayerImpls have a back pointer to their LayerChromium. … … 177 188 float m_anchorPointZ; 178 189 IntSize m_bounds; 190 IntSize m_contentBounds; 191 IntRect m_visibleLayerRect; 179 192 180 193 // Whether the "back" of this layer should draw. -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCPluginLayerImpl.cpp
r86975 r90492 47 47 } 48 48 49 void CCPluginLayerImpl::draw( const IntRect&)49 void CCPluginLayerImpl::draw() 50 50 { 51 51 ASSERT(layerRenderer()); -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCPluginLayerImpl.h
r86652 r90492 43 43 typedef ProgramBinding<VertexShaderPosTex, FragmentShaderRGBATexFlipAlpha> Program; 44 44 45 virtual void draw( const IntRect&);45 virtual void draw(); 46 46 47 47 virtual void dumpLayerProperties(TextStream&, int indent) const; -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp
r86975 r90492 76 76 } 77 77 78 void CCVideoLayerImpl::draw( const IntRect&)78 void CCVideoLayerImpl::draw() 79 79 { 80 80 if (m_skipsDraw) -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.h
r86652 r90492 48 48 typedef ProgramBinding<VertexShaderPosTexYUVStretch, FragmentShaderYUVVideo> YUVProgram; 49 49 50 virtual void draw( const IntRect&);50 virtual void draw(); 51 51 52 52 virtual void dumpLayerProperties(TextStream&, int indent) const;
Note: See TracChangeset
for help on using the changeset viewer.