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

Unified Diff: cc/surfaces/display.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/surfaces/display.h ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index f50e87c753c40d2d434294b386eb0d7a8c9fd089..129a11615d380f6821ca0737e5d72be17ee20ee3 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -29,6 +29,7 @@ Display::Display(DisplayClient* client,
manager_(manager),
bitmap_manager_(bitmap_manager),
gpu_memory_buffer_manager_(gpu_memory_buffer_manager),
+ device_scale_factor_(1.f),
blocking_main_thread_task_runner_(
BlockingTaskRunner::Create(base::MessageLoopProxy::current())),
texture_mailbox_deleter_(
@@ -45,9 +46,12 @@ bool Display::Initialize(scoped_ptr<OutputSurface> output_surface) {
return output_surface_->BindToClient(this);
}
-void Display::Resize(SurfaceId id, const gfx::Size& size) {
+void Display::Resize(SurfaceId id,
+ const gfx::Size& size,
+ float device_scale_factor) {
current_surface_id_ = id;
current_surface_size_ = size;
+ device_scale_factor_ = device_scale_factor;
client_->DisplayDamaged();
}
@@ -115,18 +119,13 @@ bool Display::Draw() {
benchmark_instrumentation::IssueDisplayRenderingStatsEvent();
DelegatedFrameData* frame_data = frame->delegated_frame_data.get();
- // Only reshape when we know we are going to draw. Otherwise, the reshape
- // can leave the window at the wrong size if we never draw and the proper
- // viewport size is never set.
- output_surface_->Reshape(current_surface_size_, 1.f);
- float device_scale_factor = 1.0f;
gfx::Rect device_viewport_rect = gfx::Rect(current_surface_size_);
gfx::Rect device_clip_rect = device_viewport_rect;
bool disable_picture_quad_image_filtering = false;
renderer_->DecideRenderPassAllocationsForFrame(frame_data->render_pass_list);
renderer_->DrawFrame(&frame_data->render_pass_list,
- device_scale_factor,
+ device_scale_factor_,
device_viewport_rect,
device_clip_rect,
disable_picture_quad_image_filtering);
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698