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

Unified Diff: src/utils/SkTextureCompressor.h

Issue 446103002: Pass compressed blitters to our mask drawing algorithm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix compiler error Created 6 years, 4 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/GrSWMaskHelper.cpp ('k') | src/utils/SkTextureCompressor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkTextureCompressor.h
diff --git a/src/utils/SkTextureCompressor.h b/src/utils/SkTextureCompressor.h
index e44e7b353dcd13c3919b1de3f89019df8d0aaf05..d82bf07a1e797a0e698472c4b60dbd9827d5eb0f 100644
--- a/src/utils/SkTextureCompressor.h
+++ b/src/utils/SkTextureCompressor.h
@@ -8,6 +8,7 @@
#ifndef SkTextureCompressor_DEFINED
#define SkTextureCompressor_DEFINED
+#include "SkBitmapProcShader.h"
#include "SkImageInfo.h"
class SkBitmap;
@@ -73,11 +74,24 @@ namespace SkTextureCompressor {
typedef bool (*CompressionProc)(uint8_t* dst, const uint8_t* src,
int width, int height, int rowBytes);
+ // Returns true if there exists a blitter for the specified format.
+ inline bool ExistsBlitterForFormat(Format format) {
+ switch (format) {
+ case kLATC_Format:
+ case kR11_EAC_Format:
+ case kASTC_12x12_Format:
+ return true;
+
+ default:
+ return false;
+ }
+ }
+
// Returns the blitter for the given compression format. Note, the blitter
// is intended to be used with the proper input. I.e. if you try to blit
// RGB source data into an R11 EAC texture, you're gonna have a bad time.
SkBlitter* CreateBlitterForFormat(int width, int height, void* compressedBuffer,
- Format format);
+ SkTBlitterAllocator *allocator, Format format);
// Returns the desired dimensions of the block size for the given format. These dimensions
// don't necessarily correspond to the specification's dimensions, since there may
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/utils/SkTextureCompressor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698