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

Side by Side Diff: trunk/src/cc/output/gl_renderer.cc

Issue 183003011: Revert 254567 "don't create SkDevice directly, use SkBitmap or (..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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
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/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 bitmap_(bitmap), 88 bitmap_(bitmap),
89 content_rect_(content_rect), 89 content_rect_(content_rect),
90 contents_scale_(contents_scale) { 90 contents_scale_(contents_scale) {
91 DCHECK(picture_pile_); 91 DCHECK(picture_pile_);
92 DCHECK(bitmap_); 92 DCHECK(bitmap_);
93 } 93 }
94 94
95 // Overridden from internal::Task: 95 // Overridden from internal::Task:
96 virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE { 96 virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE {
97 TRACE_EVENT0("cc", "OnDemandRasterTaskImpl::RunOnWorkerThread"); 97 TRACE_EVENT0("cc", "OnDemandRasterTaskImpl::RunOnWorkerThread");
98 SkCanvas canvas(*bitmap_); 98 SkBitmapDevice device(*bitmap_);
99 SkCanvas canvas(&device);
99 picture_pile_->RasterToBitmap( 100 picture_pile_->RasterToBitmap(
100 &canvas, content_rect_, contents_scale_, NULL); 101 &canvas, content_rect_, contents_scale_, NULL);
101 } 102 }
102 103
103 protected: 104 protected:
104 virtual ~OnDemandRasterTaskImpl() {} 105 virtual ~OnDemandRasterTaskImpl() {}
105 106
106 private: 107 private:
107 PicturePileImpl* picture_pile_; 108 PicturePileImpl* picture_pile_;
108 SkBitmap* bitmap_; 109 SkBitmap* bitmap_;
(...skipping 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after
3036 is_scissor_enabled_ = false; 3037 is_scissor_enabled_ = false;
3037 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); 3038 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST));
3038 scissor_rect_needs_reset_ = true; 3039 scissor_rect_needs_reset_ = true;
3039 } 3040 }
3040 3041
3041 bool GLRenderer::IsContextLost() { 3042 bool GLRenderer::IsContextLost() {
3042 return output_surface_->context_provider()->IsContextLost(); 3043 return output_surface_->context_provider()->IsContextLost();
3043 } 3044 }
3044 3045
3045 } // namespace cc 3046 } // namespace cc
OLDNEW
« no previous file with comments | « trunk/src/android_webview/native/java_browser_view_renderer_helper.cc ('k') | trunk/src/cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698