Bug 1208283 (part 2) - Change ColorLayer::mColor, ColorLayerProperties::mColor, ReadbackLayer::mBackgroundColor from gfxRBGA to gfx::Color. r=jwatt.

This avoids some gfxRGBA-to-Color conversions.
This commit is contained in:
Nicholas Nethercote
2015-09-24 18:16:45 -07:00
parent 7b071516f8
commit c279a5c60e
15 changed files with 40 additions and 27 deletions

View File

@@ -113,7 +113,7 @@ ReadbackProcessor::BuildUpdatesForLayer(ReadbackLayer* aLayer)
if (aLayer->mBackgroundColor != colorLayer->GetColor()) {
aLayer->mBackgroundLayer = nullptr;
aLayer->mBackgroundColor = colorLayer->GetColor();
NS_ASSERTION(aLayer->mBackgroundColor.a == 1.0,
NS_ASSERTION(aLayer->mBackgroundColor.a == 1.f,
"Color layer said it was opaque!");
nsRefPtr<gfxContext> ctx =
aLayer->mSink->BeginUpdate(aLayer->GetRect(),
@@ -135,7 +135,7 @@ ReadbackProcessor::BuildUpdatesForLayer(ReadbackLayer* aLayer)
offset != aLayer->mBackgroundLayerOffset) {
aLayer->mBackgroundLayer = paintedLayer;
aLayer->mBackgroundLayerOffset = offset;
aLayer->mBackgroundColor = gfxRGBA(0,0,0,0);
aLayer->mBackgroundColor = Color();
paintedLayer->SetUsedForReadback(true);
} else {
nsIntRegion invalid;