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

Unified Diff: cc/test/pixel_test.cc

Issue 23171014: Fix UpdateTilePriorities viewport in Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to 221292 Created 7 years, 3 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/test/pixel_test.h ('k') | cc/test/pixel_test_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/pixel_test.cc
diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc
index 73c4437214276b807ec548fca3db6b8e5d103723..8801596731a51e0b451450066d20d3fa3661a432 100644
--- a/cc/test/pixel_test.cc
+++ b/cc/test/pixel_test.cc
@@ -28,12 +28,17 @@ class PixelTest::PixelTestRendererClient
: public RendererClient, public OutputSurfaceClient {
public:
explicit PixelTestRendererClient(gfx::Rect device_viewport)
- : device_viewport_(device_viewport), stencil_enabled_(false) {}
+ : device_viewport_(device_viewport),
+ device_clip_(device_viewport),
+ stencil_enabled_(false) {}
// RendererClient implementation.
virtual gfx::Rect DeviceViewport() const OVERRIDE {
return device_viewport_;
}
+ virtual gfx::Rect DeviceClip() const OVERRIDE {
+ return device_clip_;
+ }
virtual float DeviceScaleFactor() const OVERRIDE {
return 1.f;
}
@@ -64,9 +69,13 @@ class PixelTest::PixelTestRendererClient
virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE {}
virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE {}
virtual void DidLoseOutputSurface() OVERRIDE {}
- virtual void SetExternalDrawConstraints(const gfx::Transform& transform,
- gfx::Rect viewport) OVERRIDE {
+ virtual void SetExternalDrawConstraints(
+ const gfx::Transform& transform,
+ gfx::Rect viewport,
+ gfx::Rect clip,
+ bool valid_for_tile_management) OVERRIDE {
device_viewport_ = viewport;
+ device_clip_ = clip;
}
virtual void SetExternalStencilTest(bool enable) OVERRIDE {
stencil_enabled_ = enable;
@@ -77,6 +86,7 @@ class PixelTest::PixelTestRendererClient
private:
gfx::Rect device_viewport_;
+ gfx::Rect device_clip_;
bool stencil_enabled_;
LayerTreeSettings settings_;
};
@@ -188,6 +198,11 @@ void PixelTest::ForceExpandedViewport(gfx::Size surface_expansion,
}
}
+void PixelTest::ForceDeviceClip(gfx::Rect clip) {
+ static_cast<PixelTestOutputSurface*>(output_surface_.get())
+ ->set_device_clip(clip);
+}
+
void PixelTest::EnableExternalStencilTest() {
fake_client_->SetExternalStencilTest(true);
}
« no previous file with comments | « cc/test/pixel_test.h ('k') | cc/test/pixel_test_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698