aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mock
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-03-03 22:43:43 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-05 18:50:25 +0000
commit2a4f983c94e4f749fe24b08bc8b5ae7cc8550d1d (patch)
treee89d794eeffacf09124be0cee8bfc70001be2856 /src/gpu/mock
parent1a8d762a18d6f6494408a3a5e06a80097f8b85f7 (diff)
Remove GrSurfaceOrigin from GrSurfaceDesc.
This field has no interpretation at the GrTexture/GrGpu as the orientation is handled at the GrSurfaceProxy level. This change requires GrGpu to accept a GrSurfaceOrigin when creating a texture with initial data. The origin refers to the texel data to be uploaded. Longer term the plan is to remove this and require the data to be kTopLeft. Additionally, kBottomLeft will only be allowed for wrapped texture/RTs as this evolves. Change-Id: I7d25b0199aafd9bf3b74c39b2cae451acadcd772 Reviewed-on: https://skia-review.googlesource.com/111806 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/mock')
-rw-r--r--src/gpu/mock/GrMockCaps.h2
-rw-r--r--src/gpu/mock/GrMockGpu.cpp3
-rw-r--r--src/gpu/mock/GrMockGpu.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/mock/GrMockCaps.h b/src/gpu/mock/GrMockCaps.h
index d8a2aad866..4bcd4599c5 100644
--- a/src/gpu/mock/GrMockCaps.h
+++ b/src/gpu/mock/GrMockCaps.h
@@ -69,7 +69,7 @@ public:
bool surfaceSupportsWritePixels(const GrSurface* surface) const override { return true; }
- bool initDescForDstCopy(const GrRenderTargetProxy* src, GrSurfaceDesc* desc,
+ bool initDescForDstCopy(const GrRenderTargetProxy* src, GrSurfaceDesc* desc, GrSurfaceOrigin*,
bool* rectsMustMatch, bool* disallowSubrect) const override {
return false;
}
diff --git a/src/gpu/mock/GrMockGpu.cpp b/src/gpu/mock/GrMockGpu.cpp
index 9d1661be44..3a6b661ece 100644
--- a/src/gpu/mock/GrMockGpu.cpp
+++ b/src/gpu/mock/GrMockGpu.cpp
@@ -65,7 +65,8 @@ GrMockGpu::GrMockGpu(GrContext* context, const GrMockOptions& options,
}
sk_sp<GrTexture> GrMockGpu::onCreateTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted,
- const GrMipLevel texels[], int mipLevelCount) {
+ GrSurfaceOrigin texelsOrigin, const GrMipLevel texels[],
+ int mipLevelCount) {
GrMipMapsStatus mipMapsStatus = mipLevelCount > 1 ? GrMipMapsStatus::kValid
: GrMipMapsStatus::kNotAllocated;
GrMockTextureInfo info;
diff --git a/src/gpu/mock/GrMockGpu.h b/src/gpu/mock/GrMockGpu.h
index 74c9264976..b5398e54b3 100644
--- a/src/gpu/mock/GrMockGpu.h
+++ b/src/gpu/mock/GrMockGpu.h
@@ -55,7 +55,7 @@ private:
void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {}
- sk_sp<GrTexture> onCreateTexture(const GrSurfaceDesc&, SkBudgeted,
+ sk_sp<GrTexture> onCreateTexture(const GrSurfaceDesc&, SkBudgeted, GrSurfaceOrigin texelsOrigin,
const GrMipLevel texels[], int mipLevelCount) override;
sk_sp<GrTexture> onWrapBackendTexture(const GrBackendTexture&, GrWrapOwnership) override {