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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1950523002: Remove GrLayerHoister (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Forgot to remove some files Created 4 years, 5 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/SkGpuDevice.h ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index f6851f18126bd120b436ed5ec6f1bda2b7aa87a7..41e654a89cb31dafbec43619a2d1307b201c3fe8 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -13,8 +13,6 @@
#include "GrGpu.h"
#include "GrGpuResourcePriv.h"
#include "GrImageIDTextureAdjuster.h"
-#include "GrLayerHoister.h"
-#include "GrRecordReplaceDraw.h"
#include "GrStyle.h"
#include "GrTracing.h"
#include "SkCanvasPriv.h"
@@ -27,7 +25,6 @@
#include "SkImageCacherator.h"
#include "SkImageFilter.h"
#include "SkImageFilterCache.h"
-#include "SkLayerInfo.h"
#include "SkMaskFilter.h"
#include "SkNinePatchIter.h"
#include "SkPathEffect.h"
@@ -1837,79 +1834,6 @@ sk_sp<SkSurface> SkGpuDevice::makeSurface(const SkImageInfo& info, const SkSurfa
&props);
}
-bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture* mainPicture,
- const SkMatrix* matrix, const SkPaint* paint) {
- ASSERT_SINGLE_OWNER
-#ifndef SK_IGNORE_GPU_LAYER_HOISTING
- // todo: should handle this natively
- if (paint ||
- (kRGBA_8888_SkColorType != mainCanvas->imageInfo().colorType() &&
- kBGRA_8888_SkColorType != mainCanvas->imageInfo().colorType())) {
- return false;
- }
-
- const SkBigPicture::AccelData* data = nullptr;
- if (const SkBigPicture* bp = mainPicture->asSkBigPicture()) {
- data = bp->accelData();
- }
- if (!data) {
- return false;
- }
-
- const SkLayerInfo *gpuData = static_cast<const SkLayerInfo*>(data);
- if (0 == gpuData->numBlocks()) {
- return false;
- }
-
- SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled;
-
- SkIRect iBounds;
- if (!mainCanvas->getClipDeviceBounds(&iBounds)) {
- return false;
- }
-
- SkRect clipBounds = SkRect::Make(iBounds);
-
- SkMatrix initialMatrix = mainCanvas->getTotalMatrix();
-
- GrLayerHoister::Begin(fContext);
-
- GrLayerHoister::FindLayersToAtlas(fContext, mainPicture,
- initialMatrix,
- clipBounds,
- &atlasedNeedRendering, &atlasedRecycled,
- fDrawContext->numColorSamples());
-
- GrLayerHoister::DrawLayersToAtlas(fContext, atlasedNeedRendering);
-
- SkTDArray<GrHoistedLayer> needRendering, recycled;
-
- SkAutoCanvasMatrixPaint acmp(mainCanvas, matrix, paint, mainPicture->cullRect());
-
- GrLayerHoister::FindLayersToHoist(fContext, mainPicture,
- initialMatrix,
- clipBounds,
- &needRendering, &recycled,
- fDrawContext->numColorSamples());
-
- GrLayerHoister::DrawLayers(fContext, needRendering);
-
- // Render the entire picture using new layers
- GrRecordReplaceDraw(mainPicture, mainCanvas, fContext->getLayerCache(),
- initialMatrix, nullptr);
-
- GrLayerHoister::UnlockLayers(fContext, needRendering);
- GrLayerHoister::UnlockLayers(fContext, recycled);
- GrLayerHoister::UnlockLayers(fContext, atlasedNeedRendering);
- GrLayerHoister::UnlockLayers(fContext, atlasedRecycled);
- GrLayerHoister::End(fContext);
-
- return true;
-#else
- return false;
-#endif
-}
-
SkImageFilterCache* SkGpuDevice::getImageFilterCache() {
ASSERT_SINGLE_OWNER
// We always return a transient cache, so it is freed after each
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698