Changeset 112407 in webkit
- Timestamp:
- Mar 28, 2012 9:03:29 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112403 r112407 1 2012-03-28 Arvid Nilsson <anilsson@rim.com> 2 3 [BlackBerry] Plumb through GraphicsLayer::contentsOpaque() to LayerTiler 4 https://bugs.webkit.org/show_bug.cgi?id=82457 5 6 Reviewed by Rob Buis. 7 8 The LayerTiler already knows not to turn on GL_BLEND for opaque layers. 9 However, it only ever sets the opaque flag for image layers and color 10 layers, never for content layers. 11 12 This was no big deal, because contentsOpaque() is currently false for 13 all layers except the root layer, which we always drew using the 14 BlackBerry::WebKit::BackingStore anyway. 15 16 When we start using RenderLayerBacking::m_usingTiledCacheLayer=true on 17 the root layer in situations where the BackingStore is unavailable, we 18 can speed up rendering of the root layer by honouring the opaque flag. 19 20 Fixed by plumbing through the GraphicsLayer::contentsOpaque() flag all 21 the way to LayerTiler and on to Texture. 22 23 * platform/graphics/blackberry/LayerData.h: 24 (WebCore::LayerData::LayerData): 25 (WebCore::LayerData::isOpaque): 26 (LayerData): 27 * platform/graphics/blackberry/LayerTile.cpp: 28 (WebCore::LayerTile::updateContents): 29 * platform/graphics/blackberry/LayerTile.h: 30 (LayerTile): 31 * platform/graphics/blackberry/LayerTiler.cpp: 32 (WebCore::LayerTiler::updateTextureContentsIfNeeded): 33 (WebCore::LayerTiler::performTileJob): 34 * platform/graphics/blackberry/LayerTiler.h: 35 (WebCore::LayerTiler::TextureJob::TextureJob): 36 (WebCore::LayerTiler::TextureJob::updateContents): 37 * platform/graphics/blackberry/LayerWebKitThread.h: 38 (WebCore::LayerWebKitThread::setOpaque): 39 * platform/graphics/blackberry/Texture.h: 40 (Texture): 41 * platform/graphics/blackberry/TextureCacheCompositingThread.cpp: 42 (WebCore::TextureCacheCompositingThread::updateContents): 43 * platform/graphics/blackberry/TextureCacheCompositingThread.h: 44 (TextureCacheCompositingThread): 45 1 46 2012-03-28 Andrey Kosyakov <caseq@chromium.org> 2 47 -
trunk/Source/WebCore/platform/graphics/blackberry/LayerData.h
r112124 r112407 79 79 , m_doubleSided(true) 80 80 , m_masksToBounds(false) 81 , m_ opaque(true)81 , m_isOpaque(false) 82 82 , m_preserves3D(false) 83 83 , m_needsDisplayOnBoundsChange(false) … … 114 114 float opacity() const { return m_opacity; } 115 115 116 bool opaque() const { return m_opaque; }116 bool isOpaque() const { return m_isOpaque; } 117 117 118 118 FloatPoint position() const { return m_position; } … … 198 198 unsigned m_doubleSided : 1; 199 199 unsigned m_masksToBounds : 1; 200 unsigned m_ opaque : 1;200 unsigned m_isOpaque : 1; 201 201 unsigned m_preserves3D : 1; 202 202 unsigned m_needsDisplayOnBoundsChange : 1; -
trunk/Source/WebCore/platform/graphics/blackberry/LayerTile.cpp
r110300 r112407 48 48 } 49 49 50 void LayerTile::updateContents(const SkBitmap& contents, const IntRect& dirtyRect, const IntRect& tileRect )50 void LayerTile::updateContents(const SkBitmap& contents, const IntRect& dirtyRect, const IntRect& tileRect, bool isOpaque) 51 51 { 52 setTexture(textureCacheCompositingThread()->updateContents(m_texture, contents, dirtyRect, tileRect ));52 setTexture(textureCacheCompositingThread()->updateContents(m_texture, contents, dirtyRect, tileRect, isOpaque)); 53 53 } 54 54 -
trunk/Source/WebCore/platform/graphics/blackberry/LayerTile.h
r110300 r112407 64 64 void setContents(const SkBitmap& contents, const IntRect& tileRect, const TileIndex&, bool isOpaque); 65 65 void setContentsToColor(const Color&); 66 void updateContents(const SkBitmap& contents, const IntRect& dirtyRect, const IntRect& tileRect );66 void updateContents(const SkBitmap& contents, const IntRect& dirtyRect, const IntRect& tileRect, bool isOpaque); 67 67 void discardContents(); 68 68 -
trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp
r112124 r112407 203 203 addTextureJob(TextureJob::setContentsToColor(color, *it)); 204 204 else 205 addTextureJob(TextureJob::updateContents(bitmap, tileRect ));205 addTextureJob(TextureJob::updateContents(bitmap, tileRect, m_layer->isOpaque())); 206 206 } 207 207 … … 298 298 addTextureJob(TextureJob::setContentsToColor(color, index)); 299 299 else 300 addTextureJob(TextureJob::updateContents(bitmap, tileRect ));300 addTextureJob(TextureJob::updateContents(bitmap, tileRect, m_layer->isOpaque())); 301 301 } 302 302 } … … 453 453 return; 454 454 case TextureJob::UpdateContents: 455 tile->updateContents(job.m_contents, job.m_dirtyRect, tileRect );455 tile->updateContents(job.m_contents, job.m_dirtyRect, tileRect, job.m_isOpaque); 456 456 return; 457 457 case TextureJob::DiscardContents: -
trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.h
r110300 r112407 101 101 } 102 102 103 TextureJob(Type type, const SkBitmap& contents, const IntRect& dirtyRect, bool isOpaque = false)103 TextureJob(Type type, const SkBitmap& contents, const IntRect& dirtyRect, bool isOpaque) 104 104 : m_type(type) 105 105 , m_contents(contents) … … 122 122 static TextureJob setContents(const SkBitmap& contents, bool isOpaque) { return TextureJob(SetContents, contents, IntRect(IntPoint::zero(), IntSize(contents.width(), contents.height())), isOpaque); } 123 123 static TextureJob setContentsToColor(const Color& color, const TileIndex& index) { return TextureJob(SetContentsToColor, color, index); } 124 static TextureJob updateContents(const SkBitmap& contents, const IntRect& dirtyRect ) { return TextureJob(UpdateContents, contents, dirtyRect); }124 static TextureJob updateContents(const SkBitmap& contents, const IntRect& dirtyRect, bool isOpaque) { return TextureJob(UpdateContents, contents, dirtyRect, isOpaque); } 125 125 static TextureJob discardContents(const IntRect& dirtyRect) { return TextureJob(DiscardContents, dirtyRect); } 126 126 static TextureJob resizeContents(const IntSize& newSize) { return TextureJob(ResizeContents, newSize); } -
trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h
r109668 r112407 96 96 void setOpacity(float opacity) { m_opacity = opacity; setNeedsCommit(); } 97 97 98 void setOpaque(bool opaque) { m_opaque = opaque; setNeedsCommit(); }98 void setOpaque(bool isOpaque) { m_isOpaque = isOpaque; setNeedsCommit(); } 99 99 100 100 void setPosition(const FloatPoint& position) { m_position = position; setNeedsCommit(); } -
trunk/Source/WebCore/platform/graphics/blackberry/Texture.h
r110040 r112407 62 62 bool protect(const IntSize&); 63 63 64 void updateContents(const SkBitmap& contents, const IntRect& dirtyRect, const IntRect& tile, bool isOpaque = false);64 void updateContents(const SkBitmap& contents, const IntRect& dirtyRect, const IntRect& tile, bool isOpaque); 65 65 void setContentsToColor(const Color&); 66 66 -
trunk/Source/WebCore/platform/graphics/blackberry/TextureCacheCompositingThread.cpp
r110040 r112407 255 255 } 256 256 257 PassRefPtr<Texture> TextureCacheCompositingThread::updateContents(const RefPtr<Texture>& textureIn, const SkBitmap& contents, const IntRect& dirtyRect, const IntRect& tileRect )257 PassRefPtr<Texture> TextureCacheCompositingThread::updateContents(const RefPtr<Texture>& textureIn, const SkBitmap& contents, const IntRect& dirtyRect, const IntRect& tileRect, bool isOpaque) 258 258 { 259 259 RefPtr<Texture> texture(textureIn); … … 267 267 TextureProtector protector(texture.get()); 268 268 269 texture->updateContents(contents, dirtyRect, tileRect );269 texture->updateContents(contents, dirtyRect, tileRect, isOpaque); 270 270 271 271 return texture.release(); -
trunk/Source/WebCore/platform/graphics/blackberry/TextureCacheCompositingThread.h
r110040 r112407 55 55 56 56 // Update contents of an existing texture, or create a new one if texture is 0. 57 PassRefPtr<Texture> updateContents(const RefPtr<Texture>&, const SkBitmap& contents, const IntRect& dirtyRect, const IntRect& tileRect );57 PassRefPtr<Texture> updateContents(const RefPtr<Texture>&, const SkBitmap& contents, const IntRect& dirtyRect, const IntRect& tileRect, bool isOpaque); 58 58 59 59 size_t memoryUsage() const { return m_memoryUsage; }
Note: See TracChangeset
for help on using the changeset viewer.