Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: src/gpu/GrLayerHoister.cpp

Issue 1905383002: Retract SkDevice a bit more (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrLayerHoister.h ('k') | src/gpu/text/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrLayerHoister.cpp
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp
index 38aff8c2f37c3276ef936f7dc291ef5eb5586369..c768b7f3a4807d15926892ff73ade52214faeb5f 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]);
}
}
}
« no previous file with comments | « src/gpu/GrLayerHoister.h ('k') | src/gpu/text/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698