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

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

Issue 25040002: Enables fullscreen subtitle and media control from Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@build_hack
Patch Set: rebased, let's go! Created 6 years, 11 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/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 #include <map> 9 #include <map>
10 10
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 void CompositorImpl::SetWindowBounds(const gfx::Size& size) { 247 void CompositorImpl::SetWindowBounds(const gfx::Size& size) {
248 if (size_ == size) 248 if (size_ == size)
249 return; 249 return;
250 250
251 size_ = size; 251 size_ = size;
252 if (host_) 252 if (host_)
253 host_->SetViewportSize(size); 253 host_->SetViewportSize(size);
254 root_layer_->SetBounds(size); 254 root_layer_->SetBounds(size);
255 } 255 }
256 256
257 void CompositorImpl::SetHasTransparentBackground(bool flag) {
258 has_transparent_background_ = flag;
259 if (host_)
260 host_->set_has_transparent_background(flag);
261 }
262
257 bool CompositorImpl::CompositeAndReadback(void *pixels, const gfx::Rect& rect) { 263 bool CompositorImpl::CompositeAndReadback(void *pixels, const gfx::Rect& rect) {
258 if (host_) 264 if (host_)
259 return host_->CompositeAndReadback(pixels, rect); 265 return host_->CompositeAndReadback(pixels, rect);
260 else 266 else
261 return false; 267 return false;
262 } 268 }
263 269
264 cc::UIResourceId CompositorImpl::GenerateUIResource( 270 cc::UIResourceId CompositorImpl::GenerateUIResource(
265 const cc::UIResourceBitmap& bitmap) { 271 const cc::UIResourceBitmap& bitmap) {
266 if (!host_) 272 if (!host_)
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 default: 494 default:
489 return GL_UNSIGNED_SHORT_5_6_5; 495 return GL_UNSIGNED_SHORT_5_6_5;
490 } 496 }
491 } 497 }
492 498
493 void CompositorImpl::DidCommit() { 499 void CompositorImpl::DidCommit() {
494 root_window_->OnCompositingDidCommit(); 500 root_window_->OnCompositingDidCommit();
495 } 501 }
496 502
497 } // namespace content 503 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698