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

Unified Diff: cc/test/pixel_test_output_surface.cc

Issue 2399983003: cc: Make OutputSurface::Reshape abstract (Closed)
Patch Set: reshapeabstract: . 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
Index: cc/test/pixel_test_output_surface.cc
diff --git a/cc/test/pixel_test_output_surface.cc b/cc/test/pixel_test_output_surface.cc
index 93cc427664d879b875ebaee8ced73ee651287f59..11424c003caf199ec11212a4244818fc5f6f8bfc 100644
--- a/cc/test/pixel_test_output_surface.cc
+++ b/cc/test/pixel_test_output_surface.cc
@@ -38,12 +38,15 @@ void PixelTestOutputSurface::BindFramebuffer() {
}
void PixelTestOutputSurface::Reshape(const gfx::Size& size,
- float scale_factor,
+ float device_scale_factor,
const gfx::ColorSpace& color_space,
bool has_alpha) {
- gfx::Size expanded_size(size.width() + surface_expansion_size_.width(),
- size.height() + surface_expansion_size_.height());
- OutputSurface::Reshape(expanded_size, scale_factor, color_space, has_alpha);
+ if (context_provider()) {
+ context_provider()->ContextGL()->ResizeCHROMIUM(
+ size.width(), size.height(), device_scale_factor, has_alpha);
+ } else {
+ software_device()->Resize(size, device_scale_factor);
+ }
}
bool PixelTestOutputSurface::HasExternalStencilTest() const {
« no previous file with comments | « cc/test/pixel_test_output_surface.h ('k') | content/browser/compositor/gpu_browser_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698