зеркало из https://github.com/mozilla/gecko-dev.git
Bug 651858 - Part 3: Add layers API for creating an optimal DrawTarget. r=roc
This commit is contained in:
Родитель
208c771f07
Коммит
bc37e50310
|
@ -48,6 +48,7 @@
|
|||
#include "mozilla/Util.h"
|
||||
|
||||
using namespace mozilla::layers;
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
typedef FrameMetrics::ViewID ViewID;
|
||||
const ViewID FrameMetrics::NULL_SCROLL_ID = 0;
|
||||
|
@ -210,6 +211,14 @@ LayerManager::CreateOptimalSurface(const gfxIntSize &aSize,
|
|||
CreateOffscreenSurface(aSize, gfxASurface::ContentFromFormat(aFormat));
|
||||
}
|
||||
|
||||
TemporaryRef<DrawTarget>
|
||||
LayerManager::CreateDrawTarget(const IntSize &aSize,
|
||||
SurfaceFormat aFormat)
|
||||
{
|
||||
// Right now this doesn't work on the general layer manager.
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
LayerManager::Mutated(Layer* aLayer)
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
#include "gfxColor.h"
|
||||
#include "gfxPattern.h"
|
||||
|
||||
#include "mozilla/gfx/2D.h"
|
||||
|
||||
#if defined(DEBUG) || defined(PR_LOGGING)
|
||||
# include <stdio.h> // FILE
|
||||
# include "prlog.h"
|
||||
|
@ -424,6 +426,15 @@ public:
|
|||
CreateOptimalSurface(const gfxIntSize &aSize,
|
||||
gfxASurface::gfxImageFormat imageFormat);
|
||||
|
||||
/**
|
||||
* Creates a DrawTarget which is optimized for inter-operating with this
|
||||
* layermanager.
|
||||
*/
|
||||
virtual TemporaryRef<mozilla::gfx::DrawTarget>
|
||||
CreateDrawTarget(const mozilla::gfx::IntSize &aSize,
|
||||
mozilla::gfx::SurfaceFormat aFormat);
|
||||
|
||||
|
||||
/**
|
||||
* Return the name of the layer manager's backend.
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче