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

Unified Diff: include/codec/SkScaledCodec.h

Issue 1406223002: Create an SkAndroidCodec API separate from SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Win bot fix Created 5 years, 2 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 | « include/codec/SkCodec.h ('k') | src/codec/SkAndroidCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/codec/SkScaledCodec.h
diff --git a/include/codec/SkScaledCodec.h b/include/codec/SkScaledCodec.h
deleted file mode 100644
index 028706bc9400bfb7028ba75699029d2454277484..0000000000000000000000000000000000000000
--- a/include/codec/SkScaledCodec.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#ifndef SkScaledCodec_DEFINED
-#define SkScaledCodec_DEFINED
-
-#include "SkCodec.h"
-
-class SkStream;
-
-/**
- * This class implements scaling, by sampling scanlines in the y direction.
- * x-wise sampling is implemented in the swizzler, when getScanlines() is called.
- */
-class SkScaledCodec : public SkCodec {
-public:
- static SkCodec* NewFromStream(SkStream*);
- static SkCodec* NewFromData(SkData*);
-
- virtual ~SkScaledCodec();
-
- static void ComputeSampleSize(const SkISize& dstDim, const SkISize& srcDim,
- int* sampleSizeX, int* sampleSizeY);
-
-protected:
- bool onRewind() override;
-
- /**
- * Recommend a set of destination dimensions given a requested scale
- */
- SkISize onGetScaledDimensions(float desiredScale) const override;
- bool onDimensionsSupported(const SkISize&) override;
-
- Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&, SkPMColor*, int*, int*)
- override;
- SkEncodedFormat onGetEncodedFormat() const override {
- return fCodec->getEncodedFormat();
- }
-
- bool onReallyHasAlpha() const override {
- return fCodec->reallyHasAlpha();
- }
-
- uint32_t onGetFillValue(SkColorType colorType, SkAlphaType alphaType) const override;
-
- SkScanlineOrder onGetScanlineOrder() const override;
-
-private:
-
- SkAutoTDelete<SkCodec> fCodec;
-
- explicit SkScaledCodec(SkCodec*);
-
- typedef SkCodec INHERITED;
-};
-#endif // SkScaledCodec_DEFINED
« no previous file with comments | « include/codec/SkCodec.h ('k') | src/codec/SkAndroidCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698