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

Side by Side Diff: cc/layers/content_layer.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/cc.gyp ('k') | cc/layers/heads_up_display_layer_impl.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/content_layer.h" 5 #include "cc/layers/content_layer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "cc/layers/content_layer_client.h" 10 #include "cc/layers/content_layer_client.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 rendering_stats_instrumentation(), 120 rendering_stats_instrumentation(),
121 id()); 121 id());
122 } else { 122 } else {
123 updater_ = BitmapContentLayerUpdater::Create( 123 updater_ = BitmapContentLayerUpdater::Create(
124 painter.Pass(), 124 painter.Pass(),
125 rendering_stats_instrumentation(), 125 rendering_stats_instrumentation(),
126 id()); 126 id());
127 } 127 }
128 updater_->SetOpaque(contents_opaque()); 128 updater_->SetOpaque(contents_opaque());
129 129
130 unsigned texture_format = 130 SetTextureFormat(
131 layer_tree_host()->GetRendererCapabilities().best_texture_format; 131 layer_tree_host()->GetRendererCapabilities().best_texture_format);
132 SetTextureFormat(texture_format);
133 } 132 }
134 133
135 void ContentLayer::SetContentsOpaque(bool opaque) { 134 void ContentLayer::SetContentsOpaque(bool opaque) {
136 Layer::SetContentsOpaque(opaque); 135 Layer::SetContentsOpaque(opaque);
137 if (updater_.get()) 136 if (updater_.get())
138 updater_->SetOpaque(opaque); 137 updater_->SetOpaque(opaque);
139 } 138 }
140 139
141 void ContentLayer::UpdateCanUseLCDText() { 140 void ContentLayer::UpdateCanUseLCDText() {
142 if (can_use_lcd_text_last_frame_ == can_use_lcd_text()) 141 if (can_use_lcd_text_last_frame_ == can_use_lcd_text())
(...skipping 17 matching lines...) Expand all
160 gfx::RectF opaque; 159 gfx::RectF opaque;
161 160
162 skia::RefPtr<SkPicture> picture = skia::AdoptRef(new SkPicture); 161 skia::RefPtr<SkPicture> picture = skia::AdoptRef(new SkPicture);
163 SkCanvas* canvas = picture->beginRecording(width, height); 162 SkCanvas* canvas = picture->beginRecording(width, height);
164 client_->PaintContents(canvas, gfx::Rect(width, height), &opaque); 163 client_->PaintContents(canvas, gfx::Rect(width, height), &opaque);
165 picture->endRecording(); 164 picture->endRecording();
166 return picture; 165 return picture;
167 } 166 }
168 167
169 } // namespace cc 168 } // namespace cc
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/heads_up_display_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698