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

Side by Side Diff: cc/resources/raster_worker_pool.cc

Issue 27973002: cc: Adding ETC1 support to UIResourceBitmap and ResourceProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | cc/resources/resource.h » ('j') | cc/resources/resource.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/resources/raster_worker_pool.h" 5 #include "cc/resources/raster_worker_pool.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/debug/devtools_instrumentation.h" 10 #include "cc/debug/devtools_instrumentation.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 bitmap.allocPixels(); 131 bitmap.allocPixels();
132 break; 132 break;
133 case RGBA_8888: 133 case RGBA_8888:
134 case BGRA_8888: 134 case BGRA_8888:
135 bitmap.setConfig(SkBitmap::kARGB_8888_Config, 135 bitmap.setConfig(SkBitmap::kARGB_8888_Config,
136 size.width(), 136 size.width(),
137 size.height(), 137 size.height(),
138 stride); 138 stride);
139 bitmap.setPixels(buffer); 139 bitmap.setPixels(buffer);
140 break; 140 break;
141 case ETC1:
141 case LUMINANCE_8: 142 case LUMINANCE_8:
142 case RGB_565: 143 case RGB_565:
143 NOTREACHED(); 144 NOTREACHED();
144 break; 145 break;
145 } 146 }
146 147
147 SkBitmapDevice device(bitmap); 148 SkBitmapDevice device(bitmap);
148 SkCanvas canvas(&device); 149 SkCanvas canvas(&device);
149 skia::RefPtr<SkDrawFilter> draw_filter; 150 skia::RefPtr<SkDrawFilter> draw_filter;
150 switch (raster_mode_) { 151 switch (raster_mode_) {
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 586
586 internal::GraphNode* decode_node = CreateGraphNodeForTask( 587 internal::GraphNode* decode_node = CreateGraphNodeForTask(
587 decode_task, priority, graph); 588 decode_task, priority, graph);
588 decode_node->add_dependent(raster_node); 589 decode_node->add_dependent(raster_node);
589 } 590 }
590 591
591 return raster_node; 592 return raster_node;
592 } 593 }
593 594
594 } // namespace cc 595 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/resource.h » ('j') | cc/resources/resource.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698