Exemplo n.º 1
0
CompositorProxy::CompositorProxy(uint64_t elementId, uint32_t attributeFlags)
    : m_elementId(elementId)
    , m_bitfieldsSupported(attributeFlags)
{
    ASSERT(isControlThread());
    ASSERT(sanityCheckAttributeFlags(m_bitfieldsSupported));
    Platform::current()->mainThread()->taskRunner()->postTask(FROM_HERE, threadSafeBind(&incrementProxyCountForElement, m_elementId));
}
Exemplo n.º 2
0
CompositorProxy::CompositorProxy(uint64_t elementId,
                                 uint32_t compositorMutableProperties,
                                 CompositorProxyClient* client)
    : CompositorProxy(elementId, compositorMutableProperties) {
  m_client = client;
  DCHECK(m_client);
  DCHECK(isControlThread());
  m_client->registerCompositorProxy(this);
}
Exemplo n.º 3
0
static bool raiseExceptionIfMutationNotAllowed(ExceptionState& exceptionState)
{
    if (!isControlThread()) {
        exceptionState.throwDOMException(NoModificationAllowedError, "Cannot mutate a proxy attribute from the main page.");
        return true;
    }
    if (!isCallingCompositorFrameCallback()) {
        exceptionState.throwDOMException(NoModificationAllowedError, "Cannot mutate a proxy attribute outside of a requestCompositorFrame callback.");
        return true;
    }
    return false;
}