Revision 49f60ede8c5fa62d96fcf24dad88bc46b4598b58 authored by Gaia Pushbot on 24 January 2014, 22:40:48 UTC, committed by Gaia Pushbot on 24 January 2014, 22:40:48 UTC
========

https://hg.mozilla.org/integration/gaia-1_3/rev/1c5561b54f7e
Author: Ryan VanderMeulen <ryanvm@gmail.com>
Desc: Re-land "Bug 961047 - Remove some dead code in Gaia with APZC enabled by default from the platform. r=alive,fabrice"

This reverts commit cd0647684b057a9a8d02b362fa72fa41aa70bacf.

========

https://hg.mozilla.org/integration/gaia-1_3/rev/7406608ea8e0
Author: Ryan VanderMeulen <ryanvm@gmail.com>
Desc: Revert "Bug 961047 - Remove some dead code in Gaia with APZC enabled by default from the platform. r=alive,fabrice"

This reverts commit ffd4a72a6031461fe56cc16c89ca480a0efc1383.
1 parent 0b141e1
Raw File
BasicCanvasLayer.cpp
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "BasicCanvasLayer.h"
#include "basic/BasicLayers.h"          // for BasicLayerManager
#include "mozilla/mozalloc.h"           // for operator new
#include "nsAutoPtr.h"                  // for nsRefPtr
#include "nsCOMPtr.h"                   // for already_AddRefed
#include "nsISupportsImpl.h"            // for Layer::AddRef, etc
class gfxContext;

using namespace mozilla::gfx;
using namespace mozilla::gl;

namespace mozilla {
namespace layers {

void
BasicCanvasLayer::Paint(gfxContext* aContext, Layer* aMaskLayer)
{
  if (IsHidden())
    return;

  FirePreTransactionCallback();
  UpdateSurface();
  FireDidTransactionCallback();

  gfxContext::GraphicsOperator mixBlendMode = GetEffectiveMixBlendMode();
  PaintWithOpacity(aContext, GetEffectiveOpacity(), aMaskLayer, mixBlendMode != gfxContext::OPERATOR_OVER ? mixBlendMode : GetOperator());
}

already_AddRefed<CanvasLayer>
BasicLayerManager::CreateCanvasLayer()
{
  NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
  nsRefPtr<CanvasLayer> layer = new BasicCanvasLayer(this);
  return layer.forget();
}

}
}
back to top