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

Unified Diff: cc/test/test_in_process_context_provider.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « cc/test/test_in_process_context_provider.h ('k') | cc/test/test_web_graphics_context_3d.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_in_process_context_provider.cc
diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc
index b4d580f9e0c0ddd4943739636a66ffdb9888716c..34b0493d8120c032b08f5419450a9687fd148526 100644
--- a/cc/test/test_in_process_context_provider.cc
+++ b/cc/test/test_in_process_context_provider.cc
@@ -20,7 +20,9 @@
namespace cc {
// static
-scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() {
+scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext(
+ TestGpuMemoryBufferManager* gpu_memory_buffer_manager,
+ TestImageFactory* image_factory) {
const bool is_offscreen = true;
const bool share_resources = true;
gpu::gles2::ContextCreationAttribHelper attribs;
@@ -47,14 +49,22 @@ scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() {
share_resources,
attribs,
gpu_preference,
- gpu::GLInProcessContextSharedMemoryLimits()));
+ gpu::GLInProcessContextSharedMemoryLimits(),
+ gpu_memory_buffer_manager,
+ image_factory));
DCHECK(context);
return context.Pass();
}
+scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() {
+ return CreateTestInProcessContext(nullptr, nullptr);
+}
+
TestInProcessContextProvider::TestInProcessContextProvider()
- : context_(CreateTestInProcessContext()) {}
+ : context_(CreateTestInProcessContext(&gpu_memory_buffer_manager_,
+ &image_factory_)) {
+}
TestInProcessContextProvider::~TestInProcessContextProvider() {
}
@@ -116,7 +126,11 @@ class GrContext* TestInProcessContextProvider::GrContext() {
ContextProvider::Capabilities
TestInProcessContextProvider::ContextCapabilities() {
- return ContextProvider::Capabilities();
+ ContextProvider::Capabilities capabilities;
+ capabilities.gpu.image = true;
+ capabilities.gpu.texture_rectangle = true;
+
+ return capabilities;
}
bool TestInProcessContextProvider::IsContextLost() { return false; }
« no previous file with comments | « cc/test/test_in_process_context_provider.h ('k') | cc/test/test_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698