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

Side by Side Diff: ui/compositor/layer.cc

Issue 17859002: Allow WebExternalTextureLayers to receive a bitmap along with a mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
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 "ui/compositor/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 return texture_->PrepareTexture(); 650 return texture_->PrepareTexture();
651 } 651 }
652 652
653 WebKit::WebGraphicsContext3D* Layer::Context3d() { 653 WebKit::WebGraphicsContext3D* Layer::Context3d() {
654 DCHECK(texture_layer_.get()); 654 DCHECK(texture_layer_.get());
655 if (texture_.get()) 655 if (texture_.get())
656 return texture_->HostContext3D(); 656 return texture_->HostContext3D();
657 return NULL; 657 return NULL;
658 } 658 }
659 659
660 bool Layer::PrepareTextureMailbox(cc::TextureMailbox* mailbox) { 660 bool Layer::PrepareTextureMailbox(cc::TextureMailbox* mailbox,
661 bool use_shared_memory) {
661 return false; 662 return false;
662 } 663 }
663 664
664 void Layer::SetForceRenderSurface(bool force) { 665 void Layer::SetForceRenderSurface(bool force) {
665 if (force_render_surface_ == force) 666 if (force_render_surface_ == force)
666 return; 667 return;
667 668
668 force_render_surface_ = force; 669 force_render_surface_ = force;
669 cc_layer_->SetForceRenderSurface(force_render_surface_); 670 cc_layer_->SetForceRenderSurface(force_render_surface_);
670 } 671 }
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); 959 cc_layer_->SetBounds(ConvertSizeToPixel(this, size));
959 } 960 }
960 961
961 void Layer::RecomputePosition() { 962 void Layer::RecomputePosition() {
962 cc_layer_->SetPosition(gfx::ScalePoint( 963 cc_layer_->SetPosition(gfx::ScalePoint(
963 gfx::PointF(bounds_.x(), bounds_.y()), 964 gfx::PointF(bounds_.x(), bounds_.y()),
964 device_scale_factor_)); 965 device_scale_factor_));
965 } 966 }
966 967
967 } // namespace ui 968 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698