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

Unified Diff: cc/raster/tile_task_worker_pool_perftest.cc

Issue 1819663002: Bind GrContext to GLES2Interfaces in tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@function
Patch Set: Minimal GetString impl for TestGLES2Interface in skcanvas_video_renderer_unittest.cc Created 4 years, 9 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/raster/DEPS ('k') | cc/test/test_context_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/raster/tile_task_worker_pool_perftest.cc
diff --git a/cc/raster/tile_task_worker_pool_perftest.cc b/cc/raster/tile_task_worker_pool_perftest.cc
index 086d7b192dcf06d1239e17e6effeb12c04f52d7a..567a5933402cd7b23a7d42a89c453f8fc7525b08 100644
--- a/cc/raster/tile_task_worker_pool_perftest.cc
+++ b/cc/raster/tile_task_worker_pool_perftest.cc
@@ -30,6 +30,7 @@
#include "cc/test/test_gpu_memory_buffer_manager.h"
#include "cc/test/test_shared_bitmap_manager.h"
#include "cc/test/test_web_graphics_context_3d.h"
+#include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_test.h"
#include "third_party/khronos/GLES2/gl2.h"
@@ -88,11 +89,13 @@ class PerfContextProvider : public ContextProvider {
if (gr_context_)
return gr_context_.get();
- skia::RefPtr<const GrGLInterface> null_interface =
- skia::AdoptRef(GrGLCreateNullInterface());
+ skia::RefPtr<GrGLInterface> gl_interface =
+ skia::AdoptRef(new GrGLInterface);
+ skia_bindings::InitGLES2InterfaceBindings(gl_interface.get(),
+ context_gl_.get());
gr_context_ = skia::AdoptRef(GrContext::Create(
kOpenGL_GrBackend,
- reinterpret_cast<GrBackendContext>(null_interface.get())));
+ reinterpret_cast<GrBackendContext>(gl_interface.get())));
return gr_context_.get();
}
void InvalidateGrContext(uint32_t state) override {
« no previous file with comments | « cc/raster/DEPS ('k') | cc/test/test_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698