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

Unified Diff: android_webview/browser/hardware_renderer.cc

Issue 455783002: GPU context creation code duplication cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: 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 | « no previous file | cc/test/DEPS » ('j') | gpu/command_buffer/common/gles2_cmd_utils.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/hardware_renderer.cc
diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc
index 818d3c5c99aa9cbfb23464a3da96c36c8fc60a9e..e9418583b3913d45f5274042c3b339e218aa554f 100644
--- a/android_webview/browser/hardware_renderer.cc
+++ b/android_webview/browser/hardware_renderer.cc
@@ -20,6 +20,7 @@
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_settings.h"
#include "gpu/command_buffer/client/gl_in_process_context.h"
+#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "ui/gfx/frame_time.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/rect_f.h"
@@ -46,10 +47,11 @@ scoped_refptr<cc::ContextProvider> CreateContext(
attributes.stencil = false;
attributes.shareResources = true;
attributes.noAutomaticFlushes = true;
- gpu::GLInProcessContextAttribs in_process_attribs;
- WebGraphicsContext3DInProcessCommandBufferImpl::ConvertAttributes(
- attributes, &in_process_attribs);
- in_process_attribs.lose_context_when_out_of_memory = 1;
+ gpu::gles2::ContextCreationAttribHelper attribs_for_gles2;
+ WebGraphicsContext3DImpl::ConvertAttributes(
+ attributes, &attribs_for_gles2);
+ attribs_for_gles2.lose_context_when_out_of_memory_ = true;
+ attribs_for_gles2.bind_generates_resource_ = false;
piman 2014/08/08 20:56:34 nit: move this in WebGraphicsContext3DImpl::Conver
scoped_ptr<gpu::GLInProcessContext> context(
gpu::GLInProcessContext::Create(service,
@@ -59,7 +61,7 @@ scoped_refptr<cc::ContextProvider> CreateContext(
surface->GetSize(),
share_context,
false /* share_resources */,
- in_process_attribs,
+ attribs_for_gles2,
gpu_preference));
DCHECK(context.get());
« no previous file with comments | « no previous file | cc/test/DEPS » ('j') | gpu/command_buffer/common/gles2_cmd_utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698