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

Unified Diff: src/core/SkMultiPictureDraw.cpp

Issue 1930623003: Clean up test drawContext usage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix typo 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/core/SkCanvas.cpp ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMultiPictureDraw.cpp
diff --git a/src/core/SkMultiPictureDraw.cpp b/src/core/SkMultiPictureDraw.cpp
index 09efba9377d988ab9349c0961bd420a7550912f3..26e446d2adaf463040607d4d5b5d116f6af273c2 100644
--- a/src/core/SkMultiPictureDraw.cpp
+++ b/src/core/SkMultiPictureDraw.cpp
@@ -16,6 +16,7 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
+#include "GrDrawContext.h"
#include "GrLayerHoister.h"
#include "GrRecordReplaceDraw.h"
#include "GrRenderTarget.h"
@@ -132,8 +133,8 @@ void SkMultiPictureDraw::draw(bool flush) {
SkMatrix initialMatrix = data.fCanvas->getTotalMatrix();
initialMatrix.preConcat(data.fMatrix);
- GrRenderTarget* rt = data.fCanvas->internal_private_accessTopLayerRenderTarget();
- SkASSERT(rt);
+ GrDrawContext* dc = data.fCanvas->internal_private_accessTopLayerDrawContext();
+ SkASSERT(dc);
// TODO: sorting the cacheable layers from smallest to largest
// would improve the packing and reduce the number of swaps
@@ -142,7 +143,7 @@ void SkMultiPictureDraw::draw(bool flush) {
GrLayerHoister::FindLayersToAtlas(context, data.fPicture, initialMatrix,
clipBounds,
&atlasedNeedRendering, &atlasedRecycled,
- rt->numColorSamples());
+ dc->numColorSamples());
}
}
@@ -168,14 +169,14 @@ void SkMultiPictureDraw::draw(bool flush) {
const SkMatrix initialMatrix = canvas->getTotalMatrix();
- GrRenderTarget* rt = data.fCanvas->internal_private_accessTopLayerRenderTarget();
- SkASSERT(rt);
+ GrDrawContext* dc = data.fCanvas->internal_private_accessTopLayerDrawContext();
+ SkASSERT(dc);
// Find the layers required by this canvas. It will return atlased
// layers in the 'recycled' list since they have already been drawn.
GrLayerHoister::FindLayersToHoist(context, picture, initialMatrix,
clipBounds, &needRendering, &recycled,
- rt->numColorSamples());
+ dc->numColorSamples());
GrLayerHoister::DrawLayers(context, needRendering);
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698