summaryrefslogtreecommitdiffstats
path: root/cc/surfaces/surface_factory_client.h
diff options
context:
space:
mode:
authorjbauman <jbauman@chromium.org>2015-10-16 11:34:45 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-16 18:35:24 +0000
commit5d4462e0e51ee42fa884e7a84f7749eeca9be49c (patch)
treee1298b8b14c1201f9fa6c4caa7fc1ced6c45b450 /cc/surfaces/surface_factory_client.h
parentb6feb17d469c2bb90bc1b29af60b77956bf7fe54 (diff)
downloadchromium_src-5d4462e0e51ee42fa884e7a84f7749eeca9be49c.zip
chromium_src-5d4462e0e51ee42fa884e7a84f7749eeca9be49c.tar.gz
chromium_src-5d4462e0e51ee42fa884e7a84f7749eeca9be49c.tar.bz2
Reland of Add mechanism to signal DelegatedFrameHost that a surface is about to draw. (patchset #1 id:1 of https://codereview.chromium.org/1407173002/ )
Reason for revert: Memory failure was fixed in r354541. Original issue's description: > Revert of Add mechanism to signal DelegatedFrameHost that a surface is about to draw. (patchset #7 id:120001 of https://codereview.chromium.org/1365793002/ ) > > Reason for revert: > Causing memory failures on SurfaceAggregatorValidSurfaceTest.CopyRequest in cc_unittests on > http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20MSan%20Tests/builds/10514 > and > http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20ChromeOS%20MSan%20Tests/builds/4653 > > [ RUN ] SurfaceAggregatorValidSurfaceTest.CopyRequest > ==31905==WARNING: MemorySanitizer: use-of-uninitialized-value > #0 0x7fccb3920f7e in cc::Surface::RequestCopyOfOutput(scoped_ptr\u003Ccc::CopyOutputRequest, base::DefaultDeleter\u003Ccc::CopyOutputRequest> >) cc/surfaces/surface.cc:106:15 > #1 0x7fccb3942ec9 in cc::SurfaceFactory::RequestCopyOfSurface(cc::SurfaceId, scoped_ptr\u003Ccc::CopyOutputRequest, base::DefaultDeleter\u003Ccc::CopyOutputRequest> >) cc/surfaces/surface_factory.cc:75:3 > #2 0x7fccb31ce931 in cc::(anonymous namespace)::SurfaceAggregatorValidSurfaceTest_CopyRequest_Test::TestBody() cc/surfaces/surface_aggregator_unittest.cc:285:3 > #3 0x7fccb33160d2 in HandleExceptionsInMethodIfSupported\u003Ctesting::Test, void> testing/gtest/src/gtest.cc:2458:12 > #4 0x7fccb33160d2 in testing::Test::Run() testing/gtest/src/gtest.cc:2474:0 > #5 0x7fccb331972c in testing::TestInfo::Run() testing/gtest/src/gtest.cc:2656:5 > #6 0x7fccb331b0a2 in testing::TestCase::Run() testing/gtest/src/gtest.cc:2774:5 > #7 0x7fccb333948b in testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4647:11 > #8 0x7fccb3338468 in HandleExceptionsInMethodIfSupported\u003Ctesting::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12 > #9 0x7fccb3338468 in testing::UnitTest::Run() testing/gtest/src/gtest.cc:4255:0 > #10 0x7fccb32867da in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:10 > #11 0x7fccb32867da in base::TestSuite::Run() base/test/test_suite.cc:230:0 > #12 0x7fccb327388e in Run base/callback.h:396:12 > #13 0x7fccb327388e in base::(anonymous namespace)::LaunchUnitTestsInternal(base::Callback\u003Cint ()> const&, int, bool, base::Callback\u003Cvoid ()> const&) base/test/launcher/unit_test_launcher.cc:187:0 > #14 0x7fccb32730de in base::LaunchUnitTests(int, char**, base::Callback\u003Cint ()> const&) base/test/launcher/unit_test_launcher.cc:426:10 > #15 0x7fccb0ba0c15 in main cc/test/run_all_unittests.cc:12:10 > #16 0x7fccaa41076c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226:0 > #17 0x7fccb0b41ca8 in _start ??:0:0 > > Uninitialized value was created by a heap allocation > #0 0x7fccb0b9fd92 in operator new(unsigned long) ??:0:0 > #1 0x7fccb31ce897 in CreateEmptyRequest cc/output/copy_output_request.h:26:28 > #2 0x7fccb31ce897 in cc::(anonymous namespace)::SurfaceAggregatorValidSurfaceTest_CopyRequest_Test::TestBody() cc/surfaces/surface_aggregator_unittest.cc:283:0 > #3 0x7fccb33160d2 in HandleExceptionsInMethodIfSupported\u003Ctesting::Test, void> testing/gtest/src/gtest.cc:2458:12 > #4 0x7fccb33160d2 in testing::Test::Run() testing/gtest/src/gtest.cc:2474:0 > #5 0x7fccb331972c in testing::TestInfo::Run() testing/gtest/src/gtest.cc:2656:5 > #6 0x7fccb331b0a2 in testing::TestCase::Run() testing/gtest/src/gtest.cc:2774:5 > #7 0x7fccb333948b in testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4647:11 > #8 0x7fccb3338468 in HandleExceptionsInMethodIfSupported\u003Ctesting::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12 > #9 0x7fccb3338468 in testing::UnitTest::Run() testing/gtest/src/gtest.cc:4255:0 > #10 0x7fccb32867da in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:10 > #11 0x7fccb32867da in base::TestSuite::Run() base/test/test_suite.cc:230:0 > #12 0x7fccb327388e in Run base/callback.h:396:12 > #13 0x7fccb327388e in base::(anonymous namespace)::LaunchUnitTestsInternal(base::Callback\u003Cint ()> const&, int, bool, base::Callback\u003Cvoid ()> const&) base/test/launcher/unit_test_launcher.cc:187:0 > #14 0x7fccb32730de in base::LaunchUnitTests(int, char**, base::Callback\u003Cint ()> const&) base/test/launcher/unit_test_launcher.cc:426:10 > #15 0x7fccb0ba0c15 in main cc/test/run_all_unittests.cc:12:10 > #16 0x7fccaa41076c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226:0 > > SUMMARY: MemorySanitizer: use-of-uninitialized-value (/tmp/runqXGplV/out/Release/cc_unittests+0x32e1f7e) > Exiting > > Original issue's description: > > Add mechanism to signal DelegatedFrameHost that a surface is about to draw. > > > > This allows the FrameSubscriber to request a copy of the output even when the renderer it's subscribing to hasn't changed its contents, but a child renderer (oopif or webview) has. > > > > BUG=529378 > > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > > > Committed: https://crrev.com/5ed9ab93dd9f448aac722483b6adc6b7a14cdf4b > > Cr-Commit-Position: refs/heads/master@{#354390} > > TBR=miu@chromium.org,sadrul@chromium.org,jbauman@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=529378 > > Committed: https://crrev.com/1b8d59763b4266783794a950eee388ddc110ada6 > Cr-Commit-Position: refs/heads/master@{#354446} TBR=miu@chromium.org,sadrul@chromium.org,mpearson@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=529378 Review URL: https://codereview.chromium.org/1408173002 Cr-Commit-Position: refs/heads/master@{#354554}
Diffstat (limited to 'cc/surfaces/surface_factory_client.h')
-rw-r--r--cc/surfaces/surface_factory_client.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cc/surfaces/surface_factory_client.h b/cc/surfaces/surface_factory_client.h
index 9866b27..c2a04af 100644
--- a/cc/surfaces/surface_factory_client.h
+++ b/cc/surfaces/surface_factory_client.h
@@ -6,7 +6,9 @@
#define CC_SURFACES_SURFACE_FACTORY_CLIENT_H_
#include "cc/resources/returned_resource.h"
+#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surfaces_export.h"
+#include "ui/gfx/geometry/rect.h"
namespace cc {
@@ -15,6 +17,9 @@ class CC_SURFACES_EXPORT SurfaceFactoryClient {
virtual ~SurfaceFactoryClient() {}
virtual void ReturnResources(const ReturnedResourceArray& resources) = 0;
+
+ virtual void WillDrawSurface(SurfaceId surface_id,
+ const gfx::Rect& damage_rect) {}
};
} // namespace cc