aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGpuDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r--src/gpu/SkGpuDevice.cpp57
1 files changed, 1 insertions, 56 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index a49e079e9e..0f1872666a 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -19,7 +19,6 @@
#include "GrTextContext.h"
#include "SkGpuDevice.h"
-#include "SkGpuDeviceFactory.h"
#include "SkGrTexturePixelRef.h"
#include "SkColorFilter.h"
@@ -47,6 +46,7 @@ enum {
kShaderTextureIdx = 0
};
+
///////////////////////////////////////////////////////////////////////////////
SkGpuDevice::SkAutoCachedTexture::
@@ -1494,58 +1494,3 @@ SkDevice* SkGpuDevice::onCreateCompatibleDevice(SkBitmap::Config config,
width, height, usage));
}
-
-///////////////////////////////////////////////////////////////////////////////
-
-SkGpuDeviceFactory::SkGpuDeviceFactory(GrContext* context,
- GrRenderTarget* rootRenderTarget) {
- GrAssert(NULL != context);
- GrAssert(NULL != rootRenderTarget);
-
- // check this now rather than passing this value to SkGpuDevice cons.
- // we want the rt that is bound *now* in the 3D API, not the one
- // at the time of newDevice.
- if (SkGpuDevice::Current3DApiRenderTarget() == rootRenderTarget) {
- fRootRenderTarget = context->createRenderTargetFrom3DApiState();
- } else {
- fRootRenderTarget = rootRenderTarget;
- rootRenderTarget->ref();
- }
-
- fContext = context;
- context->ref();
-
- fRootTexture = NULL;
-}
-
-SkGpuDeviceFactory::SkGpuDeviceFactory(GrContext* context, GrTexture* rootRenderTargetTexture) {
- GrAssert(NULL != context);
- GrAssert(NULL != rootRenderTargetTexture);
- GrAssert(NULL != rootRenderTargetTexture->asRenderTarget());
-
- fRootTexture = rootRenderTargetTexture;
- rootRenderTargetTexture->ref();
-
- fRootRenderTarget = rootRenderTargetTexture->asRenderTarget();
- fRootRenderTarget->ref();
-
- fContext = context;
- context->ref();
-}
-
-SkGpuDeviceFactory::~SkGpuDeviceFactory() {
- fContext->unref();
- fRootRenderTarget->unref();
- GrSafeUnref(fRootTexture);
-}
-
-SkDevice* SkGpuDeviceFactory::newDevice(SkCanvas*, SkBitmap::Config config,
- int width, int height,
- bool isOpaque, bool isLayer) {
- if (isLayer) {
- return SkNEW_ARGS(SkGpuDevice, (fContext, config, width, height));
- } else {
- return SkNEW_ARGS(SkGpuDevice, (fContext, fRootRenderTarget));
- }
-}
-