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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 126973002: Decouple cc::FakeWebGraphicsContext3D from blink::WGC3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index a3564defedfdb6233c7811a0f28d2bb6d085a44f..b53127d4d9e09f4fabc70613478c228740de9088 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -41,7 +41,6 @@
#include "media/base/media.h"
using media::VideoFrame;
-using blink::WebGraphicsContext3D;
namespace cc {
namespace {
@@ -426,7 +425,7 @@ class LayerTreeHostContextTestLostContextSucceedsWithContent
ContextProvider* contexts = host_impl->offscreen_context_provider();
if (use_surface_) {
ASSERT_TRUE(contexts);
- EXPECT_TRUE(contexts->Context3d());
+ EXPECT_TRUE(contexts->ContextGL());
// TODO(danakj): Make a fake GrContext.
// EXPECT_TRUE(contexts->GrContext());
} else {
@@ -966,8 +965,8 @@ class LayerTreeHostContextTestDontUseLostResources
static void EmptyReleaseCallback(unsigned sync_point, bool lost) {}
virtual void SetupTree() OVERRIDE {
- blink::WebGraphicsContext3D* context3d =
- child_output_surface_->context_provider()->Context3d();
+ gpu::gles2::GLES2Interface* gl =
+ child_output_surface_->context_provider()->ContextGL();
scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
@@ -1004,8 +1003,8 @@ class LayerTreeHostContextTestDontUseLostResources
resource);
gpu::Mailbox mailbox;
- context3d->genMailboxCHROMIUM(mailbox.name);
- unsigned sync_point = context3d->insertSyncPoint();
+ gl->GenMailboxCHROMIUM(mailbox.name);
+ GLuint sync_point = gl->InsertSyncPointCHROMIUM();
scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
@@ -1899,8 +1898,8 @@ class UIResourceLostEviction : public UIResourceLostTestSimple {
virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* impl,
bool visible) OVERRIDE {
- TestWebGraphicsContext3D* context = static_cast<TestWebGraphicsContext3D*>(
- impl->output_surface()->context_provider()->Context3d());
+ TestWebGraphicsContext3D* context = static_cast<TestContextProvider*>(
+ impl->output_surface()->context_provider().get())->TestContext3d();
if (!visible) {
// All resources should have been evicted.
ASSERT_EQ(0u, context->NumTextures());
@@ -1916,8 +1915,8 @@ class UIResourceLostEviction : public UIResourceLostTestSimple {
}
virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) OVERRIDE {
- TestWebGraphicsContext3D* context = static_cast<TestWebGraphicsContext3D*>(
- impl->output_surface()->context_provider()->Context3d());
+ TestWebGraphicsContext3D* context = static_cast<TestContextProvider*>(
+ impl->output_surface()->context_provider().get())->TestContext3d();
LayerTreeHostContextTest::CommitCompleteOnThread(impl);
switch (time_step_) {
case 1:
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698