Bug 1279395 - Remove gfxTeeSurface. r=eflores

This commit is contained in:
Jonathan Watt 2016-06-13 09:27:22 +01:00
Родитель 5bc6c4811d
Коммит 5958abcf36
5 изменённых файлов: 0 добавлений и 85 удалений

Просмотреть файл

@ -10,7 +10,6 @@
#include "gfxEnv.h" // for gfxEnv
#include "gfxPrefs.h" // for gfxPrefs
#include "gfxPoint.h" // for IntSize, gfxPoint
#include "gfxTeeSurface.h" // for gfxTeeSurface
#include "gfxUtils.h" // for gfxUtils
#include "ipc/ShadowLayers.h" // for ShadowLayerForwarder
#include "mozilla/ArrayUtils.h" // for ArrayLength

Просмотреть файл

@ -17,7 +17,6 @@
#include "gfxASurface.h"
#include "gfxPattern.h"
#include "gfxPlatform.h"
#include "gfxTeeSurface.h"
#include "gfxPrefs.h"
#include "GeckoProfiler.h"
#include "gfx2DGlue.h"

Просмотреть файл

@ -1,46 +0,0 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 "gfxTeeSurface.h"
#include "nsTArray.h"
#include "cairo-tee.h"
gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf)
{
Init(csurf, true);
}
gfxTeeSurface::gfxTeeSurface(gfxASurface **aSurfaces, int32_t aSurfaceCount)
{
NS_ASSERTION(aSurfaceCount > 0, "Must have a least one surface");
cairo_surface_t *csurf = cairo_tee_surface_create(aSurfaces[0]->CairoSurface());
Init(csurf, false);
for (int32_t i = 1; i < aSurfaceCount; ++i) {
cairo_tee_surface_add(csurf, aSurfaces[i]->CairoSurface());
}
}
const mozilla::gfx::IntSize
gfxTeeSurface::GetSize() const
{
RefPtr<gfxASurface> master = Wrap(cairo_tee_surface_index(mSurface, 0));
return master->GetSize();
}
void
gfxTeeSurface::GetSurfaces(nsTArray<RefPtr<gfxASurface> >* aSurfaces)
{
for (int32_t i = 0; ; ++i) {
cairo_surface_t *csurf = cairo_tee_surface_index(mSurface, i);
if (cairo_surface_status(csurf))
break;
RefPtr<gfxASurface> *elem = aSurfaces->AppendElement();
if (!elem)
return;
*elem = Wrap(csurf);
}
}

Просмотреть файл

@ -1,35 +0,0 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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/. */
#ifndef GFX_TEESURFACE_H
#define GFX_TEESURFACE_H
#include "gfxASurface.h"
#include "nsTArrayForwardDeclare.h"
#include "nsSize.h"
/**
* Wraps a cairo_tee_surface. The first surface in the surface list is the
* primary surface, which answers all surface queries (including size).
* All drawing is performed on all the surfaces.
*
* The device transform of a tee surface is applied before drawing to the
* underlying surfaces --- which also applies the device transforms of the
* underlying surfaces.
*/
class gfxTeeSurface : public gfxASurface {
public:
explicit gfxTeeSurface(cairo_surface_t *csurf);
gfxTeeSurface(gfxASurface **aSurfaces, int32_t aSurfaceCount);
virtual const mozilla::gfx::IntSize GetSize() const;
/**
* Returns the list of underlying surfaces.
*/
void GetSurfaces(nsTArray<RefPtr<gfxASurface> > *aSurfaces);
};
#endif /* GFX_TEESURFACE_H */

Просмотреть файл

@ -42,7 +42,6 @@ EXPORTS += [
'gfxSharedQuartzSurface.h',
'gfxSkipChars.h',
'gfxSVGGlyphs.h',
'gfxTeeSurface.h',
'gfxTextRun.h',
'gfxTypes.h',
'gfxUserFontSet.h',
@ -250,7 +249,6 @@ UNIFIED_SOURCES += [
'gfxScriptItemizer.cpp',
'gfxSkipChars.cpp',
'gfxSVGGlyphs.cpp',
'gfxTeeSurface.cpp',
'gfxTextRun.cpp',
'gfxUserFontSet.cpp',
'gfxUtils.cpp',