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

Unified Diff: cc/test/pixel_test.cc

Issue 2392183003: cc: Remove SurfaceSize from OutputSurface. (Closed)
Patch Set: nosurfacesize: ozonethinger Created 4 years, 2 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_software_output_device.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 772ed9dd46dff83e14c9d39efb5694a378193034..ff11182d48edb69c938a0515678c69286e7fb47e 100644
--- a/cc/test/pixel_test.cc
+++ b/cc/test/pixel_test.cc
@@ -14,6 +14,7 @@
#include "cc/output/copy_output_result.h"
#include "cc/output/gl_renderer.h"
#include "cc/output/output_surface_client.h"
+#include "cc/output/software_output_device.h"
#include "cc/output/software_renderer.h"
#include "cc/output/texture_mailbox_deleter.h"
#include "cc/raster/raster_buffer_provider.h"
@@ -22,7 +23,6 @@
#include "cc/test/fake_output_surface_client.h"
#include "cc/test/paths.h"
#include "cc/test/pixel_test_output_surface.h"
-#include "cc/test/pixel_test_software_output_device.h"
#include "cc/test/pixel_test_utils.h"
#include "cc/test/test_gpu_memory_buffer_manager.h"
#include "cc/test/test_in_process_context_provider.h"
@@ -75,11 +75,8 @@ bool PixelTest::RunPixelTestWithReadbackTargetAndArea(
target->copy_requests.push_back(std::move(request));
float device_scale_factor = 1.f;
- gfx::Rect device_viewport_rect =
- gfx::Rect(device_viewport_size_) + external_device_viewport_offset_;
- gfx::Rect device_clip_rect = external_device_clip_rect_.IsEmpty()
- ? device_viewport_rect
- : external_device_clip_rect_;
+ gfx::Rect device_viewport_rect(device_viewport_size_);
+ gfx::Rect device_clip_rect(device_viewport_size_);
if (software_renderer_) {
software_renderer_->SetDisablePictureQuadImageFiltering(
@@ -155,33 +152,14 @@ void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend,
renderer_->SetVisible(true);
}
-void PixelTest::ForceExpandedViewport(const gfx::Size& surface_expansion) {
- static_cast<PixelTestOutputSurface*>(output_surface_.get())
- ->set_surface_expansion_size(surface_expansion);
- SoftwareOutputDevice* device = output_surface_->software_device();
- if (device) {
- static_cast<PixelTestSoftwareOutputDevice*>(device)
- ->set_surface_expansion_size(surface_expansion);
- }
-}
-
-void PixelTest::ForceViewportOffset(const gfx::Vector2d& viewport_offset) {
- external_device_viewport_offset_ = viewport_offset;
-}
-
-void PixelTest::ForceDeviceClip(const gfx::Rect& clip) {
- external_device_clip_rect_ = clip;
-}
-
void PixelTest::EnableExternalStencilTest() {
static_cast<PixelTestOutputSurface*>(output_surface_.get())
->set_has_external_stencil_test(true);
}
void PixelTest::SetUpSoftwareRenderer() {
- std::unique_ptr<SoftwareOutputDevice> device(
- new PixelTestSoftwareOutputDevice());
- output_surface_.reset(new PixelTestOutputSurface(std::move(device)));
+ output_surface_.reset(
+ new PixelTestOutputSurface(base::MakeUnique<SoftwareOutputDevice>()));
output_surface_->BindToClient(output_surface_client_.get());
shared_bitmap_manager_.reset(new TestSharedBitmapManager());
bool delegated_sync_points_required = false; // Meaningless for software.
« no previous file with comments | « cc/test/pixel_test.h ('k') | cc/test/pixel_test_software_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698