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

Side by Side Diff: cc/layers/heads_up_display_layer_impl.cc

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed a signed vs. unsigned comparison in video_resource_updater.cc Created 7 years, 3 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
« no previous file with comments | « cc/layers/content_layer.cc ('k') | cc/layers/image_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/layers/heads_up_display_layer_impl.h" 5 #include "cc/layers/heads_up_display_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (!hud_resource_) 87 if (!hud_resource_)
88 hud_resource_ = ScopedResource::create(resource_provider); 88 hud_resource_ = ScopedResource::create(resource_provider);
89 89
90 // TODO(danakj): The HUD could swap between two textures instead of creating a 90 // TODO(danakj): The HUD could swap between two textures instead of creating a
91 // texture every frame in ubercompositor. 91 // texture every frame in ubercompositor.
92 if (hud_resource_->size() != content_bounds() || 92 if (hud_resource_->size() != content_bounds() ||
93 resource_provider->InUseByConsumer(hud_resource_->id())) 93 resource_provider->InUseByConsumer(hud_resource_->id()))
94 hud_resource_->Free(); 94 hud_resource_->Free();
95 95
96 if (!hud_resource_->id()) { 96 if (!hud_resource_->id()) {
97 hud_resource_->Allocate( 97 hud_resource_->Allocate(content_bounds(),
98 content_bounds(), GL_RGBA, ResourceProvider::TextureUsageAny); 98 ResourceProvider::TextureUsageAny,
99 RGBA_8888);
99 } 100 }
100 101
101 return LayerImpl::WillDraw(draw_mode, resource_provider); 102 return LayerImpl::WillDraw(draw_mode, resource_provider);
102 } 103 }
103 104
104 void HeadsUpDisplayLayerImpl::AppendQuads(QuadSink* quad_sink, 105 void HeadsUpDisplayLayerImpl::AppendQuads(QuadSink* quad_sink,
105 AppendQuadsData* append_quads_data) { 106 AppendQuadsData* append_quads_data) {
106 if (!hud_resource_->id()) 107 if (!hud_resource_->id())
107 return; 108 return;
108 109
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 canvas->restore(); 688 canvas->restore();
688 } 689 }
689 } 690 }
690 } 691 }
691 692
692 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { 693 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const {
693 return "cc::HeadsUpDisplayLayerImpl"; 694 return "cc::HeadsUpDisplayLayerImpl";
694 } 695 }
695 696
696 } // namespace cc 697 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/content_layer.cc ('k') | cc/layers/image_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698