Chromium Code Reviews| Index: cc/resources/texture_compressor.cc |
| diff --git a/cc/resources/texture_compressor.cc b/cc/resources/texture_compressor.cc |
| index 186a47d04b65a7d9539b033a61b5c8d35c1d01f9..9aa0f37257c16bd83277cddbdbec8a705120a6c7 100644 |
| --- a/cc/resources/texture_compressor.cc |
| +++ b/cc/resources/texture_compressor.cc |
| @@ -4,15 +4,24 @@ |
| #include "cc/resources/texture_compressor.h" |
| +#include "base/cpu.h" |
|
reveman
2015/05/06 18:44:00
nit: guard this with a ifdef as it's not always us
radu.velea
2015/05/07 11:21:39
Done.
|
| #include "base/logging.h" |
| #include "cc/resources/texture_compressor_etc1.h" |
| +#include "cc/resources/texture_compressor_etc1_sse.h" |
|
reveman
2015/05/06 18:44:00
nit: guard this with a ifdef as it's not always us
radu.velea
2015/05/07 11:21:39
Done.
|
| namespace cc { |
| scoped_ptr<TextureCompressor> TextureCompressor::Create(Format format) { |
| switch (format) { |
| - case kFormatETC1: |
| + case kFormatETC1: { |
| +#if defined(__i386__) || defined(__x86_64__) |
|
reveman
2015/05/06 18:44:00
Can you add a define to the build files and use it
radu.velea
2015/05/07 11:21:39
-msse2 sets __SSE2__ would this be enough for the
|
| + base::CPU cpu; |
| + if (cpu.has_sse2()) { |
| + return make_scoped_ptr(new TextureCompressorETC1SSE()); |
| + } |
| +#endif |
| return make_scoped_ptr(new TextureCompressorETC1()); |
| + } |
| } |
| NOTREACHED(); |