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

Unified Diff: src/core/SkCodecImageGenerator.cpp

Issue 1582373003: Revert of Create an SkCodecImageGenerator (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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/SkCodecImageGenerator.h ('k') | tests/CodexTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCodecImageGenerator.cpp
diff --git a/src/core/SkCodecImageGenerator.cpp b/src/core/SkCodecImageGenerator.cpp
deleted file mode 100644
index 2fef381ec1ffa332f5d62c8eb30d6b7eebcbe909..0000000000000000000000000000000000000000
--- a/src/core/SkCodecImageGenerator.cpp
+++ /dev/null
@@ -1,46 +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.
- */
-
-#include "SkCodecImageGenerator.h"
-
-SkImageGenerator* SkCodecImageGenerator::NewFromEncodedCodec(SkData* data) {
- SkCodec* codec = SkCodec::NewFromData(data);
- if (nullptr == codec) {
- return nullptr;
- }
-
- return new SkCodecImageGenerator(codec, data);
-}
-
-SkCodecImageGenerator::SkCodecImageGenerator(SkCodec* codec, SkData* data)
- : INHERITED(codec->getInfo())
- , fCodec(codec)
- , fData(SkRef(data))
-{}
-
-SkData* SkCodecImageGenerator::onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) {
- return SkRef(fData.get());
-}
-
-bool SkCodecImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
- SkPMColor ctable[], int* ctableCount) {
-
- SkCodec::Result result = fCodec->getPixels(info, pixels, rowBytes, nullptr, ctable,
- ctableCount);
- switch (result) {
- case SkCodec::kSuccess:
- case SkCodec::kIncompleteInput:
- return true;
- default:
- return false;
- }
-}
-
-bool SkCodecImageGenerator::onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3],
- SkYUVColorSpace* colorSpace) {
- return false;
-}
« no previous file with comments | « src/core/SkCodecImageGenerator.h ('k') | tests/CodexTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698