aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrLayerHoister.cpp11
-rw-r--r--src/gpu/GrLayerHoister.h4
-rw-r--r--src/gpu/text/GrStencilAndCoverTextContext.cpp2
-rw-r--r--src/image/SkImage_Gpu.cpp1
4 files changed, 7 insertions, 11 deletions
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp
index 38aff8c2f3..c768b7f3a4 100644
--- a/src/gpu/GrLayerHoister.cpp
+++ b/src/gpu/GrLayerHoister.cpp
@@ -5,18 +5,17 @@
* found in the LICENSE file.
*/
+#include "GrContext.h"
#include "GrLayerCache.h"
#include "GrLayerHoister.h"
#include "GrRecordReplaceDraw.h"
#include "SkBigPicture.h"
#include "SkCanvas.h"
-#include "SkGpuDevice.h"
#include "SkLayerInfo.h"
#include "SkRecordDraw.h"
#include "SkSpecialImage.h"
#include "SkSurface.h"
-#include "SkSurface_Gpu.h"
// Create the layer information for the hoisted layer and secure the
// required texture/render target resources.
@@ -278,7 +277,7 @@ void GrLayerHoister::DrawLayersToAtlas(GrContext* context,
}
void GrLayerHoister::FilterLayer(GrContext* context,
- SkGpuDevice* device,
+ const SkSurfaceProps* props,
const GrHoistedLayer& info) {
GrCachedLayer* layer = info.fLayer;
@@ -305,7 +304,7 @@ void GrLayerHoister::FilterLayer(GrContext* context,
sk_sp<SkSpecialImage> img(SkSpecialImage::MakeFromGpu(subset,
kNeedNewImageUniqueID_SpecialImage,
layer->texture(),
- &device->surfaceProps()));
+ props));
SkIPoint offset = SkIPoint::Make(0, 0);
sk_sp<SkSpecialImage> result(layer->filter()->filterImage(img.get(),
@@ -358,9 +357,7 @@ void GrLayerHoister::DrawLayers(GrContext* context, const SkTDArray<GrHoistedLay
layerCanvas->flush();
if (layer->filter()) {
- SkSurface_Gpu* gpuSurf = static_cast<SkSurface_Gpu*>(surface.get());
-
- FilterLayer(context, gpuSurf->getDevice(), layers[i]);
+ FilterLayer(context, &surface->props(), layers[i]);
}
}
}
diff --git a/src/gpu/GrLayerHoister.h b/src/gpu/GrLayerHoister.h
index 8b338a8224..044e36b761 100644
--- a/src/gpu/GrLayerHoister.h
+++ b/src/gpu/GrLayerHoister.h
@@ -114,10 +114,10 @@ public:
private:
/** Update the GrTexture in 'layer' with its filtered version
@param context Owner of the layer cache (and thus the layers)
- @param device Required by the filtering code
+ @param props Surface properties
@param info Layer info for a layer needing filtering prior to being composited
*/
- static void FilterLayer(GrContext* context, SkGpuDevice* device, const GrHoistedLayer& info);
+ static void FilterLayer(GrContext* context, const SkSurfaceProps*, const GrHoistedLayer& info);
};
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index 1355036ffe..8f6b8baa8e 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -7,6 +7,7 @@
#include "GrStencilAndCoverTextContext.h"
#include "GrAtlasTextContext.h"
+#include "GrContext.h"
#include "GrDrawContext.h"
#include "GrPath.h"
#include "GrPathRange.h"
@@ -16,7 +17,6 @@
#include "SkDraw.h"
#include "SkDrawProcs.h"
#include "SkGlyphCache.h"
-#include "SkGpuDevice.h"
#include "SkGrPriv.h"
#include "SkDrawFilter.h"
#include "SkPath.h"
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index d667c3ea7e..359c775fdb 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -13,7 +13,6 @@
#include "effects/GrYUVEffect.h"
#include "SkCanvas.h"
#include "SkBitmapCache.h"
-#include "SkGpuDevice.h"
#include "SkGrPixelRef.h"
#include "SkGrPriv.h"
#include "SkImage_Gpu.h"