2011-06-24 21:41:16 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
2012-05-21 15:12:37 +04:00
|
|
|
* 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/. */
|
2011-05-26 23:41:33 +04:00
|
|
|
|
2011-06-24 21:41:16 +04:00
|
|
|
#ifndef MOZILLA_GFX_GRADIENTSTOPSD2D_H_
|
|
|
|
#define MOZILLA_GFX_GRADIENTSTOPSD2D_H_
|
2011-05-26 23:41:33 +04:00
|
|
|
|
2011-06-24 21:41:16 +04:00
|
|
|
#include "2D.h"
|
2011-05-26 23:41:33 +04:00
|
|
|
|
2011-08-23 19:35:13 +04:00
|
|
|
#include <d2d1.h>
|
2011-05-26 23:41:33 +04:00
|
|
|
|
2011-06-24 21:41:16 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
2011-05-26 23:41:33 +04:00
|
|
|
|
2011-06-24 21:41:16 +04:00
|
|
|
class GradientStopsD2D : public GradientStops
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GradientStopsD2D(ID2D1GradientStopCollection *aStopCollection)
|
|
|
|
: mStopCollection(aStopCollection)
|
|
|
|
{}
|
2011-05-26 23:41:33 +04:00
|
|
|
|
2011-06-24 21:41:16 +04:00
|
|
|
virtual BackendType GetBackendType() const { return BACKEND_DIRECT2D; }
|
2011-05-26 23:41:33 +04:00
|
|
|
|
2011-06-24 21:41:16 +04:00
|
|
|
private:
|
|
|
|
friend class DrawTargetD2D;
|
2011-05-26 23:41:33 +04:00
|
|
|
|
2011-06-24 21:41:16 +04:00
|
|
|
mutable RefPtr<ID2D1GradientStopCollection> mStopCollection;
|
2011-05-26 23:41:33 +04:00
|
|
|
};
|
|
|
|
|
2011-06-24 21:41:16 +04:00
|
|
|
}
|
2011-05-26 23:41:33 +04:00
|
|
|
}
|
|
|
|
|
2011-06-24 21:41:16 +04:00
|
|
|
#endif /* MOZILLA_GFX_GRADIENTSTOPSD2D_H_ */
|