If a company made a child pornography anime (so not using real children, just drawings), would it be illegal?
The Coroners and Justice Act of April 2009 (c. 2) created a new offence in England and Wales and Northern Ireland of possession of a prohibited image of a child. This act makes cartoon pornography depicting minors illegal in the UK. This Act did not replace the 1978 act, extended in 1994, since that covered "pseudo-photographs"—images that appear to be photographs. In 2008 it was further extended to cover tracings, and other works derived from photographs or pseudo-photographs. A prohibited cartoon image is one which involves a minor in situations which are pornographic and "grossly offensive, disgusting or otherwise of an obscene character."
Prior to this, although not explicitly in the statutes, the law was interpreted to apply to cartoon images, though only where the images are realistic and indistinguishable from photographs. The new law however covered images whether or not they are realistic.
The Wikipedia article includes a further list of footnotes and sources for this topic. The only reason I wrote this answer because I remembered reading about this in the newspaper around 4 years ago when the Netherlands outlawed such images and they referred to the UK having 'recently' banned such things as well rather than just the older acts mentioned by Flup.
In England and Wales, indecent 'pseudo-photographs' of children were made illegal by s84 Criminal Justice and Public Order Act 1994. This amended s1 Protection of Children Act 1978 to criminalise the making, distribution, possession or publication of such images.
'Pseudo-photograph' is defined by s7(7) PCA 1978 as—
... an image, whether made by computer-graphics or otherwise howsoever, which appears to be a photograph.
Virtual child pornography "pandered" as real is illegal in the U.S., and the law forbidding it was upheld by the Supreme Court in United States v. Williams (2008). The Court explains the distinction:
An offer to provide or request to receive virtual child pornography is not prohibited by the statute. A crime is committed only when the speaker believes or intends the listener to believe that the subject of the proposed transaction depicts real children.
Here's a Law Review article on the general question.