Summary: | Triple-buffer RemoteLayerBackingStore | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||
Component: | WebKit2 | Assignee: | Tim Horton <thorton> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | andersca, commit-queue, psolanki, sam, simon.fraser, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Tim Horton
2014-05-10 15:09:19 PDT
Created attachment 231275 [details]
patch
Need to build mac and sim to make sure I haven't broken anything. Attachment 231275 [details] did not pass style-queue:
ERROR: Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h:92: The parameter name "type" adds no information, so it should be removed. [readability/parameter_name] [5]
Total errors found: 1 in 4 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 231275 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=231275&action=review > Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm:403 > + if (type == BufferType::Front && m_frontBuffer.surface && m_frontBuffer.isVolatile != isVolatile) { > + if (!isVolatile || !m_frontBuffer.surface->isInUse()) { > + IOSurface::SurfaceState previousState = m_frontBuffer.surface->setIsVolatile(isVolatile); > + m_frontBuffer.isVolatile = isVolatile; > + > + // Becoming non-volatile and the front buffer was purged, so we need to repaint. > + if (!isVolatile && (previousState == IOSurface::SurfaceState::Empty)) > + setNeedsDisplay(); > + } else > + return false; > + } else if (type == BufferType::Back && m_backBuffer.surface && m_backBuffer.isVolatile != isVolatile) { > + if (!isVolatile || !m_backBuffer.surface->isInUse()) { > + m_backBuffer.surface->setIsVolatile(isVolatile); > + m_backBuffer.isVolatile = isVolatile; > + } else > + return false; > + } else if (type == BufferType::SecondaryBack && m_secondaryBackBuffer.surface && m_secondaryBackBuffer.isVolatile != isVolatile) { > + if (!isVolatile || !m_secondaryBackBuffer.surface->isInUse()) { > + m_secondaryBackBuffer.surface->setIsVolatile(isVolatile); > + m_secondaryBackBuffer.isVolatile = isVolatile; > + } else > + return false; This logic is pretty confusing. Can you convert this to a switch(type)? |