summaryrefslogtreecommitdiffstats
path: root/cc/test/render_pass_test_utils.h
diff options
context:
space:
mode:
authorleandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-15 21:45:52 +0000
committerleandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-15 21:45:52 +0000
commitf35e232a94af088f5a1a231f2489a5b06460bffe (patch)
tree124388157fbe8e64db6181a9b5467a3ca3fc8be0 /cc/test/render_pass_test_utils.h
parent3ff3a45baf225760a1ceab36868e333010f555ee (diff)
downloadchromium_src-f35e232a94af088f5a1a231f2489a5b06460bffe.zip
chromium_src-f35e232a94af088f5a1a231f2489a5b06460bffe.tar.gz
chromium_src-f35e232a94af088f5a1a231f2489a5b06460bffe.tar.bz2
[Android WebView] Tie together Chrome's browser compositor with the Android View system.
This patch introduces a new feature to the compositor: - A setting to enable cleaning the framebuffer, disabled by default. This prevents destroying data below us when rendering non-rectangular views (e.g. during a rotation). A second required feature will be added by a later patch: - A device scissor rect that intersects any scissor calculation. Used to ensure we never render outside where the Android View System tells us. There are also some issues with the Android View side regarding the restoration of the GL state. This patch introduces a temporary workaround by reading and manually restoring the state changed by the compositor. This will go out as soon as the problem is fixed in the Android side. BUG=161409,154180 Review URL: https://chromiumcodereview.appspot.com/11316310 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173324 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/render_pass_test_utils.h')
-rw-r--r--cc/test/render_pass_test_utils.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/cc/test/render_pass_test_utils.h b/cc/test/render_pass_test_utils.h
new file mode 100644
index 0000000..c06fbd6
--- /dev/null
+++ b/cc/test/render_pass_test_utils.h
@@ -0,0 +1,44 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_TEST_RENDER_PASS_TEST_UTILS_H_
+#define CC_TEST_RENDER_PASS_TEST_UTILS_H_
+
+#include "cc/render_pass.h"
+#include "cc/scoped_ptr_vector.h"
+#include "third_party/skia/include/core/SkColor.h"
+
+namespace gfx {
+class Rect;
+class Transform;
+}
+
+namespace WebKitTests {
+class TestRenderPass;
+}
+
+namespace cc {
+
+class SolidColorDrawQuad;
+
+// Adds a new render pass with the provided properties to the given
+// render pass list.
+WebKitTests::TestRenderPass* addRenderPass(
+ ScopedPtrVector<RenderPass>& passList,
+ RenderPass::Id id,
+ const gfx::Rect& outputRect,
+ const gfx::Transform& rootTransform);
+
+// Adds a solid quad to a given render pass.
+SolidColorDrawQuad* addQuad(WebKitTests::TestRenderPass* pass,
+ const gfx::Rect& rect,
+ SkColor color);
+
+// Adds a render pass quad to an existing render pass.
+void addRenderPassQuad(WebKitTests::TestRenderPass* toPass,
+ WebKitTests::TestRenderPass* contributingPass);
+
+} // namespace cc
+
+#endif // CC_TEST_RENDER_PASS_TEST_UTILS_H_