gfx/layers/Effects.cpp

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "Effects.h"
     7 #include "LayersLogging.h"              // for AppendToString
     8 #include "nsAString.h"
     9 #include "nsPrintfCString.h"            // for nsPrintfCString
    10 #include "nsString.h"                   // for nsAutoCString
    12 using namespace mozilla::layers;
    14 void
    15 TexturedEffect::PrintInfo(nsACString& aTo, const char* aPrefix)
    16 {
    17   aTo += aPrefix;
    18   aTo += nsPrintfCString("%s (0x%p)", Name(), this);
    19   AppendToString(aTo, mTextureCoords, " [texture-coords=", "]");
    21   if (mPremultiplied) {
    22     aTo += " [premultiplied]";
    23   } else {
    24     aTo += " [not-premultiplied]";
    25   }
    27   AppendToString(aTo, mFilter, " [filter=", "]");
    28 }
    30 void
    31 EffectMask::PrintInfo(nsACString& aTo, const char* aPrefix)
    32 {
    33   aTo += aPrefix;
    34   aTo += nsPrintfCString("EffectMask (0x%p)", this);
    35   AppendToString(aTo, mSize, " [size=", "]");
    36   AppendToString(aTo, mMaskTransform, " [mask-transform=", "]");
    38   if (mIs3D) {
    39     aTo += " [is-3d]";
    40   }
    41 }
    43 void
    44 EffectRenderTarget::PrintInfo(nsACString& aTo, const char* aPrefix)
    45 {
    46   TexturedEffect::PrintInfo(aTo, aPrefix);
    47   aTo += nsPrintfCString(" [render-target=%p]", mRenderTarget.get());
    48 }
    50 void
    51 EffectSolidColor::PrintInfo(nsACString& aTo, const char* aPrefix)
    52 {
    53   aTo += aPrefix;
    54   aTo += nsPrintfCString("EffectSolidColor (0x%p) [color=%x]", this, mColor.ToABGR());
    55 }

mercurial