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

Unified Diff: cc/layers/heads_up_display_layer_impl.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/content_layer.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/heads_up_display_layer_impl.cc
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index 19217c9078dfe025d44e585c4a7e6d19ca9207e5..97fddae60e4f4aa154950918eb2f4a156d49f315 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -97,7 +97,7 @@ void HeadsUpDisplayLayerImpl::AcquireResource(
scoped_ptr<ScopedResource> resource =
ScopedResource::Create(resource_provider);
resource->Allocate(internal_content_bounds_,
- ResourceProvider::TEXTURE_HINT_IMMUTABLE, RGBA_8888);
+ ResourceProvider::TextureHintImmutable, RGBA_8888);
resources_.push_back(resource.Pass());
}
@@ -210,10 +210,13 @@ void HeadsUpDisplayLayerImpl::UpdateHudTexture(
size_t row_bytes = 0;
const void* pixels = hud_surface_->getCanvas()->peekPixels(&info, &row_bytes);
DCHECK(pixels);
+ gfx::Rect content_rect(internal_content_bounds_);
DCHECK(info.colorType() == kN32_SkColorType);
- resource_provider->CopyToResource(resources_.back()->id(),
- static_cast<const uint8_t*>(pixels),
- internal_content_bounds_);
+ resource_provider->SetPixels(resources_.back()->id(),
+ static_cast<const uint8_t*>(pixels),
+ content_rect,
+ content_rect,
+ gfx::Vector2d());
}
void HeadsUpDisplayLayerImpl::ReleaseResources() {
« no previous file with comments | « cc/layers/content_layer.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698