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

Unified Diff: gpu/gles2_conform_support/egl/display.cc

Issue 10534173: GPU Program Caching (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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
Index: gpu/gles2_conform_support/egl/display.cc
diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc
index 4c1c59dcf7e1ffbc03edf4380c0b3c51bfc88b24..3247266844090a8108f8dc8bb343abcbdaa98da9 100644
--- a/gpu/gles2_conform_support/egl/display.cc
+++ b/gpu/gles2_conform_support/egl/display.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/memory/weak_ptr.h"
#include "gpu/command_buffer/client/gles2_lib.h"
#include "gpu/command_buffer/client/transfer_buffer.h"
#include "gpu/command_buffer/service/context_group.h"
@@ -14,11 +15,17 @@
#include "gpu/gles2_conform_support/egl/config.h"
#include "gpu/gles2_conform_support/egl/surface.h"
+using base::WeakPtr;
+
namespace {
const int32 kCommandBufferSize = 1024 * 1024;
const int32 kTransferBufferSize = 512 * 1024;
}
+namespace gpu {
+class ShaderCache;
+}
+
namespace egl {
Display::Display(EGLNativeDisplayType display_id)
@@ -93,7 +100,10 @@ EGLSurface Display::CreateWindowSurface(EGLConfig config,
if (!command_buffer->Initialize())
return NULL;
- gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, true));
+ gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(
+ NULL,
+ true,
+ base::WeakPtr<gpu::ShaderCache>()));
decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get()));
if (!decoder_.get())

Powered by Google App Engine
This is Rietveld 408576698