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

Unified Diff: content/browser/compositor/delegated_frame_host.cc

Issue 329003002: Cleanup: Remove DCHECK failure handling in DelegatedFrameHost. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/delegated_frame_host.cc
===================================================================
--- content/browser/compositor/delegated_frame_host.cc (revision 275839)
+++ content/browser/compositor/delegated_frame_host.cc (working copy)
@@ -124,18 +124,14 @@
// Only ARGB888 and RGB565 supported as of now.
bool format_support = ((config == SkBitmap::kRGB_565_Config) ||
(config == SkBitmap::kARGB_8888_Config));
- if (!format_support) {
- DCHECK(format_support);
- callback.Run(false, SkBitmap());
- return;
- }
+ DCHECK(format_support);
if (!CanCopyToBitmap()) {
callback.Run(false, SkBitmap());
return;
}
- const gfx::Size& dst_size_in_pixel = client_->ConvertViewSizeToPixel(
- dst_size);
+ const gfx::Size& dst_size_in_pixel =
+ client_->ConvertViewSizeToPixel(dst_size);
scoped_ptr<cc::CopyOutputRequest> request =
cc::CopyOutputRequest::CreateRequest(base::Bind(
&DelegatedFrameHost::CopyFromCompositingSurfaceHasResult,
@@ -275,7 +271,7 @@
float frame_device_scale_factor,
const std::vector<ui::LatencyInfo>& latency_info) {
RenderWidgetHostImpl* host = client_->GetHost();
- DCHECK_NE(0u, frame_data->render_pass_list.size());
+ DCHECK(!frame_data->render_pass_list.empty());
cc::RenderPass* root_pass = frame_data->render_pass_list.back();
@@ -336,7 +332,7 @@
last_output_surface_id_ = output_surface_id;
}
if (frame_size.IsEmpty()) {
- DCHECK_EQ(0u, frame_data->resource_list.size());
+ DCHECK(frame_data->resource_list.empty());
EvictDelegatedFrame();
} else {
if (!resource_collection_) {
@@ -504,8 +500,6 @@
scoped_ptr<cc::SingleReleaseCallback> release_callback;
result->TakeTexture(&texture_mailbox, &release_callback);
DCHECK(texture_mailbox.IsTexture());
- if (!texture_mailbox.IsTexture())
- return;
ignore_result(scoped_callback_runner.Release());
@@ -537,16 +531,8 @@
return;
}
DCHECK(result->HasBitmap());
- base::ScopedClosureRunner scoped_callback_runner(
- base::Bind(callback, false, SkBitmap()));
-
scoped_ptr<SkBitmap> source = result->TakeBitmap();
DCHECK(source);
- if (!source)
- return;
-
- ignore_result(scoped_callback_runner.Release());
-
SkBitmap bitmap = skia::ImageOperations::Resize(
*source,
skia::ImageOperations::RESIZE_BEST,
@@ -673,8 +659,6 @@
scoped_ptr<cc::SingleReleaseCallback> release_callback;
result->TakeTexture(&texture_mailbox, &release_callback);
DCHECK(texture_mailbox.IsTexture());
- if (!texture_mailbox.IsTexture())
- return;
gfx::Rect result_rect(result->size());
« 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