gfx/layers/Effects.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/layers/Effects.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,56 @@
     1.4 +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "Effects.h"
    1.10 +#include "LayersLogging.h"              // for AppendToString
    1.11 +#include "nsAString.h"
    1.12 +#include "nsPrintfCString.h"            // for nsPrintfCString
    1.13 +#include "nsString.h"                   // for nsAutoCString
    1.14 +
    1.15 +using namespace mozilla::layers;
    1.16 +
    1.17 +void
    1.18 +TexturedEffect::PrintInfo(nsACString& aTo, const char* aPrefix)
    1.19 +{
    1.20 +  aTo += aPrefix;
    1.21 +  aTo += nsPrintfCString("%s (0x%p)", Name(), this);
    1.22 +  AppendToString(aTo, mTextureCoords, " [texture-coords=", "]");
    1.23 +
    1.24 +  if (mPremultiplied) {
    1.25 +    aTo += " [premultiplied]";
    1.26 +  } else {
    1.27 +    aTo += " [not-premultiplied]";
    1.28 +  }
    1.29 +
    1.30 +  AppendToString(aTo, mFilter, " [filter=", "]");
    1.31 +}
    1.32 +
    1.33 +void
    1.34 +EffectMask::PrintInfo(nsACString& aTo, const char* aPrefix)
    1.35 +{
    1.36 +  aTo += aPrefix;
    1.37 +  aTo += nsPrintfCString("EffectMask (0x%p)", this);
    1.38 +  AppendToString(aTo, mSize, " [size=", "]");
    1.39 +  AppendToString(aTo, mMaskTransform, " [mask-transform=", "]");
    1.40 +
    1.41 +  if (mIs3D) {
    1.42 +    aTo += " [is-3d]";
    1.43 +  }
    1.44 +}
    1.45 +
    1.46 +void
    1.47 +EffectRenderTarget::PrintInfo(nsACString& aTo, const char* aPrefix)
    1.48 +{
    1.49 +  TexturedEffect::PrintInfo(aTo, aPrefix);
    1.50 +  aTo += nsPrintfCString(" [render-target=%p]", mRenderTarget.get());
    1.51 +}
    1.52 +
    1.53 +void
    1.54 +EffectSolidColor::PrintInfo(nsACString& aTo, const char* aPrefix)
    1.55 +{
    1.56 +  aTo += aPrefix;
    1.57 +  aTo += nsPrintfCString("EffectSolidColor (0x%p) [color=%x]", this, mColor.ToABGR());
    1.58 +}
    1.59 +

mercurial