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

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

Issue 1304063014: cc: Plumbing for BeginFrameSource based on Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add surface_id to SurfaceFactoryClient::SetBeginFrameSource Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 void RenderWidgetHostViewAndroid::ReturnResources( 978 void RenderWidgetHostViewAndroid::ReturnResources(
979 const cc::ReturnedResourceArray& resources) { 979 const cc::ReturnedResourceArray& resources) {
980 if (resources.empty()) 980 if (resources.empty())
981 return; 981 return;
982 std::copy(resources.begin(), resources.end(), 982 std::copy(resources.begin(), resources.end(),
983 std::back_inserter(surface_returned_resources_)); 983 std::back_inserter(surface_returned_resources_));
984 if (!ack_callbacks_.size()) 984 if (!ack_callbacks_.size())
985 SendReturnedDelegatedResources(last_output_surface_id_); 985 SendReturnedDelegatedResources(last_output_surface_id_);
986 } 986 }
987 987
988 void RenderWidgetHostViewAndroid::SetBeginFrameSource(
989 cc::BeginFrameSource* begin_frame_source) {
990 // TODO(tansell): Hook this up.
991 NOTIMPLEMENTED();
992 }
993
988 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { 994 void RenderWidgetHostViewAndroid::DestroyDelegatedContent() {
989 RemoveLayers(); 995 RemoveLayers();
990 frame_provider_ = NULL; 996 frame_provider_ = NULL;
991 if (!surface_id_.is_null()) { 997 if (!surface_id_.is_null()) {
992 DCHECK(surface_factory_.get()); 998 DCHECK(surface_factory_.get());
993 surface_factory_->Destroy(surface_id_); 999 surface_factory_->Destroy(surface_id_);
994 surface_id_ = cc::SurfaceId(); 1000 surface_id_ = cc::SurfaceId();
995 } 1001 }
996 layer_ = NULL; 1002 layer_ = NULL;
997 } 1003 }
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 results->orientationAngle = display.RotationAsDegree(); 2018 results->orientationAngle = display.RotationAsDegree();
2013 results->orientationType = 2019 results->orientationType =
2014 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2020 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2015 gfx::DeviceDisplayInfo info; 2021 gfx::DeviceDisplayInfo info;
2016 results->depth = info.GetBitsPerPixel(); 2022 results->depth = info.GetBitsPerPixel();
2017 results->depthPerComponent = info.GetBitsPerComponent(); 2023 results->depthPerComponent = info.GetBitsPerComponent();
2018 results->isMonochrome = (results->depthPerComponent == 0); 2024 results->isMonochrome = (results->depthPerComponent == 0);
2019 } 2025 }
2020 2026
2021 } // namespace content 2027 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698