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

Unified Diff: blimp/client/app/blimp_startup.cc

Issue 1680333004: Add support for encoding/decoding WebP images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@serialize-deserialize-images-framework
Patch Set: address minor last comments Created 4 years, 10 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 | « blimp/client/DEPS ('k') | blimp/client/feature/compositor/decoding_image_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/app/blimp_startup.cc
diff --git a/blimp/client/app/blimp_startup.cc b/blimp/client/app/blimp_startup.cc
index 0d1f18710fd43926b63d22859a5ecff20f0a20c3..e19ee3f0617976248820b59850f40033cf5e1637 100644
--- a/blimp/client/app/blimp_startup.cc
+++ b/blimp/client/app/blimp_startup.cc
@@ -10,17 +10,25 @@
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "blimp/client/app/blimp_discardable_memory_allocator.h"
+#include "blimp/client/feature/compositor/decoding_image_generator.h"
#include "third_party/skia/include/core/SkGraphics.h"
#include "ui/gl/gl_surface.h"
+class SkImageGenerator;
+
namespace {
base::LazyInstance<scoped_ptr<base::MessageLoopForUI>> g_main_message_loop =
LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<blimp::client::BlimpDiscardableMemoryAllocator>
g_discardable_memory_allocator = LAZY_INSTANCE_INITIALIZER;
+
+SkImageGenerator* CreateImageGenerator(SkData* data) {
+ return blimp::client::DecodingImageGenerator::create(data);
}
+} // namespace
+
namespace blimp {
namespace client {
@@ -54,6 +62,7 @@ bool InitializeMainMessageLoop() {
if (!gfx::GLSurface::InitializeOneOff())
return false;
SkGraphics::Init();
+ SkGraphics::SetImageGeneratorFromEncodedFactory(CreateImageGenerator);
g_main_message_loop.Get().reset(new base::MessageLoopForUI);
return true;
}
« no previous file with comments | « blimp/client/DEPS ('k') | blimp/client/feature/compositor/decoding_image_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698