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

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

Issue 273113004: Make CompositorImpl::CompositeAndReadback fail and return false. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compositor-impl-cnr-false: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 root_layer_->SetBounds(size); 361 root_layer_->SetBounds(size);
362 } 362 }
363 363
364 void CompositorImpl::SetHasTransparentBackground(bool flag) { 364 void CompositorImpl::SetHasTransparentBackground(bool flag) {
365 has_transparent_background_ = flag; 365 has_transparent_background_ = flag;
366 if (host_) 366 if (host_)
367 host_->set_has_transparent_background(flag); 367 host_->set_has_transparent_background(flag);
368 } 368 }
369 369
370 bool CompositorImpl::CompositeAndReadback(void *pixels, const gfx::Rect& rect) { 370 bool CompositorImpl::CompositeAndReadback(void *pixels, const gfx::Rect& rect) {
371 if (host_) 371 return false;
372 return host_->CompositeAndReadback(pixels, rect);
373 else
374 return false;
375 } 372 }
376 373
377 cc::UIResourceId CompositorImpl::GenerateUIResourceFromUIResourceBitmap( 374 cc::UIResourceId CompositorImpl::GenerateUIResourceFromUIResourceBitmap(
378 const cc::UIResourceBitmap& bitmap, 375 const cc::UIResourceBitmap& bitmap,
379 bool is_transient) { 376 bool is_transient) {
380 if (!host_) 377 if (!host_)
381 return 0; 378 return 0;
382 379
383 cc::UIResourceId id = 0; 380 cc::UIResourceId id = 0;
384 scoped_ptr<cc::UIResourceClient> resource; 381 scoped_ptr<cc::UIResourceClient> resource;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 514
518 void CompositorImpl::DidCommit() { 515 void CompositorImpl::DidCommit() {
519 root_window_->OnCompositingDidCommit(); 516 root_window_->OnCompositingDidCommit();
520 } 517 }
521 518
522 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) { 519 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) {
523 root_layer_->AddChild(layer); 520 root_layer_->AddChild(layer);
524 } 521 }
525 522
526 } // namespace content 523 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698