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

Side by Side Diff: content/browser/renderer_host/software_frame_manager.cc

Issue 750173002: Move dip utils to gfx/geometry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missed android change Created 6 years 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 unified diff | Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | ui/compositor/dip_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/software_frame_manager.h" 5 #include "content/browser/renderer_host/software_frame_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/debug/alias.h" 9 #include "base/debug/alias.h"
10 #include "base/numerics/safe_math.h" 10 #include "base/numerics/safe_math.h"
11 #include "cc/resources/shared_bitmap.h" 11 #include "cc/resources/shared_bitmap.h"
12 #include "content/browser/renderer_host/dip_util.h"
13 #include "content/common/host_shared_bitmap_manager.h" 12 #include "content/common/host_shared_bitmap_manager.h"
14 #include "content/public/browser/user_metrics.h" 13 #include "content/public/browser/user_metrics.h"
14 #include "ui/gfx/geometry/dip_util.h"
15 15
16 namespace { 16 namespace {
17 17
18 void ReleaseMailbox(scoped_refptr<content::SoftwareFrame> frame, 18 void ReleaseMailbox(scoped_refptr<content::SoftwareFrame> frame,
19 uint32 sync_point, 19 uint32 sync_point,
20 bool lost_resource) {} 20 bool lost_resource) {}
21 21
22 } // namespace 22 } // namespace
23 23
24 namespace content { 24 namespace content {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 return current_frame_->frame_device_scale_factor_; 159 return current_frame_->frame_device_scale_factor_;
160 } 160 }
161 161
162 gfx::Size SoftwareFrameManager::GetCurrentFrameSizeInPixels() const { 162 gfx::Size SoftwareFrameManager::GetCurrentFrameSizeInPixels() const {
163 DCHECK(HasCurrentFrame()); 163 DCHECK(HasCurrentFrame());
164 return current_frame_->frame_size_pixels_; 164 return current_frame_->frame_size_pixels_;
165 } 165 }
166 166
167 gfx::Size SoftwareFrameManager::GetCurrentFrameSizeInDIP() const { 167 gfx::Size SoftwareFrameManager::GetCurrentFrameSizeInDIP() const {
168 DCHECK(HasCurrentFrame()); 168 DCHECK(HasCurrentFrame());
169 return ConvertSizeToDIP(current_frame_->frame_device_scale_factor_, 169 return gfx::ConvertSizeToDIP(current_frame_->frame_device_scale_factor_,
170 current_frame_->frame_size_pixels_); 170 current_frame_->frame_size_pixels_);
171 } 171 }
172 172
173 void SoftwareFrameManager::EvictCurrentFrame() { 173 void SoftwareFrameManager::EvictCurrentFrame() {
174 DCHECK(HasCurrentFrame()); 174 DCHECK(HasCurrentFrame());
175 DiscardCurrentFrame(); 175 DiscardCurrentFrame();
176 if (client_) 176 if (client_)
177 client_->ReleaseReferencesToSoftwareFrame(); 177 client_->ReleaseReferencesToSoftwareFrame();
178 } 178 }
179 179
180 } // namespace content 180 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | ui/compositor/dip_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698