RenderLayerCompositor inherits from GraphicsLayerClient, the definition of which is wrapped in a USE(ACCELERATED_COMPOSITING) conditional. If RenderLayerCompositor is truly dependent on a class which is only available when that flag is enabled, the RenderLayerCompositor should be wrapped in a USE(ACCELERATED_COMPOSITING) conditional as well.
RenderLayerCompositor.h should be included within guards. That's what we do everywhere. #if USE(ACCELERATED_COMPOSITING) #include "RenderLayerCompositor.h" #endif
Seems OK to wrap the header contents in guards.