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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp

Issue 1882503002: Remove setErrorMessageCallback from WebGraphicsContext3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@errorcallback
Patch Set: weberrors: owned Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 #include "gpu/command_buffer/client/gles2_interface_stub.h" 33 #include "gpu/command_buffer/client/gles2_interface_stub.h"
34 #include "platform/RuntimeEnabledFeatures.h" 34 #include "platform/RuntimeEnabledFeatures.h"
35 #include "platform/graphics/ImageBuffer.h" 35 #include "platform/graphics/ImageBuffer.h"
36 #include "platform/graphics/UnacceleratedImageBufferSurface.h" 36 #include "platform/graphics/UnacceleratedImageBufferSurface.h"
37 #include "platform/graphics/gpu/Extensions3DUtil.h" 37 #include "platform/graphics/gpu/Extensions3DUtil.h"
38 #include "platform/graphics/test/MockWebGraphicsContext3D.h" 38 #include "platform/graphics/test/MockWebGraphicsContext3D.h"
39 #include "public/platform/Platform.h" 39 #include "public/platform/Platform.h"
40 #include "public/platform/WebExternalTextureMailbox.h" 40 #include "public/platform/WebExternalTextureMailbox.h"
41 #include "public/platform/WebGraphicsContext3D.h" 41 #include "public/platform/WebGraphicsContext3D.h"
42 #include "public/platform/WebGraphicsContext3DProvider.h" 42 #include "public/platform/WebGraphicsContext3DProvider.h"
43 #include "public/platform/callback/WebClosure.h" 43 #include "public/platform/functional/WebFunction.h"
44 #include "testing/gmock/include/gmock/gmock.h" 44 #include "testing/gmock/include/gmock/gmock.h"
45 #include "testing/gtest/include/gtest/gtest.h" 45 #include "testing/gtest/include/gtest/gtest.h"
46 #include "wtf/RefPtr.h" 46 #include "wtf/RefPtr.h"
47 47
48 using testing::Test; 48 using testing::Test;
49 using testing::_; 49 using testing::_;
50 50
51 namespace blink { 51 namespace blink {
52 52
53 namespace { 53 namespace {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 : m_context(std::move(context)) 267 : m_context(std::move(context))
268 , m_gl(std::move(gl)) 268 , m_gl(std::move(gl))
269 { 269 {
270 } 270 }
271 271
272 WebGraphicsContext3D* context3d() override { return m_context.get(); } 272 WebGraphicsContext3D* context3d() override { return m_context.get(); }
273 gpu::gles2::GLES2Interface* contextGL() override { return m_gl.get(); } 273 gpu::gles2::GLES2Interface* contextGL() override { return m_gl.get(); }
274 // Not used by WebGL code. 274 // Not used by WebGL code.
275 GrContext* grContext() override { return nullptr; } 275 GrContext* grContext() override { return nullptr; }
276 void setLostContextCallback(WebClosure) {} 276 void setLostContextCallback(WebClosure) {}
277 void setErrorMessageCallback(WebFunction<void(const char*, int32_t id)>) {}
277 278
278 private: 279 private:
279 OwnPtr<WebGraphicsContext3D> m_context; 280 OwnPtr<WebGraphicsContext3D> m_context;
280 OwnPtr<gpu::gles2::GLES2Interface> m_gl; 281 OwnPtr<gpu::gles2::GLES2Interface> m_gl;
281 }; 282 };
282 283
283 class DrawingBufferTest : public Test { 284 class DrawingBufferTest : public Test {
284 protected: 285 protected:
285 void SetUp() override 286 void SetUp() override
286 { 287 {
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 m_drawingBuffer->markContentsChanged(); 818 m_drawingBuffer->markContentsChanged();
818 EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); 819 EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0));
819 EXPECT_EQ(initialSize, webContext()->mostRecentlyProducedSize()); 820 EXPECT_EQ(initialSize, webContext()->mostRecentlyProducedSize());
820 EXPECT_FALSE(mailbox.allowOverlay); 821 EXPECT_FALSE(mailbox.allowOverlay);
821 822
822 m_drawingBuffer->mailboxReleased(mailbox, false); 823 m_drawingBuffer->mailboxReleased(mailbox, false);
823 m_drawingBuffer->beginDestruction(); 824 m_drawingBuffer->beginDestruction();
824 } 825 }
825 826
826 } // namespace blink 827 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698